Answers for "jquery get element max height"

1

jquery get element max height

var maxHeight = Math.max.apply(null, $("div.panel").map(function ()
{
    return $(this).height();
}).get());

//or
var heights = $("div.panel").map(function ()
    {
        return $(this).height();
    }).get();

maxHeight = Math.max.apply(null, heights);
Posted by: Guest on May-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language