I want to add and event listener to call a function whenever my window resize, but somehow it doesnt work! I tried these codes but none worked!
$(function(){$(window).resize(titleResize);});
$(function(){$(window).resize(titleResize());});
$(window).resize(titleResize);
$(window).resize(titleResize());
any idea?
BTW it's my titleResize function:
function titleResize() {
maxHeight = 0;
$("div.lae-entry-text-wrap > h3").each(function(){
titleHeight = $(this).height();
if (titleHeight > maxHeight){
maxHeight = titleHeight;
}
});
$("div.lae-entry-text-wrap > h3").css("height", maxHeight);
}