javascript - Calculating the highest element in a list and applying this value to all on resize (jQuery) -


i wrote function calculate height value of highest element in list , apply value elements in list. works, not on windows resize. how force function running on resize? here code:

var heightequalizing = function () {     var element = $('.tm-whatwedo li');      var elementheights = element.map(function () {         return $(this).height();     }).get();      var maxheight = math.max.apply(null, elementheights);      element.height(maxheight);     console.log(maxheight); };  $(window).resize(heightequalizing); $(document).ready(heightequalizing); 

$(window).on('resize', function(){       heightequalizing(); }); 

update:

maybe misunderstand? in fiddle window resize event fires function: http://jsfiddle.net/jessikwa/r1obmfh2/


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -