For whatever reason the following:
$(function() {
$(window).resize(function() {
alert(\"resized!\");
});
});
only fires an event wh
I was with the same problem, saw all kind of solutions and didn't work.
Making some tests I noticed that the $(window).resize, at least in my case, would only trigger with $(document).ready() before it. Not $(function()); nor $(window).ready();
So my code now is:
$(document).ready(function(){
$(window).resize(function(){
// refresh variables
// Apply variables again
});
});
...and even an alert work!