I'm not sure if there is a βcleanβ native way to do this (I hope there is someone to shed some light)
but you will βhackβ it like this http://jsfiddle.net/tuuN3/
var myInterval = false; // this variable will hold the interval and work as a flag var $win = $(window); //jquery win object var dimensions = [ $win.width(), $win.height() ]; //initial dimensions $(window).resize(function() { //on window resize... if( !myInterval ) //if the interval is not set, { myInterval = setInterval( function() { //initialize it //and check to see if the dimenions have changed or remained the same if( dimensions[ 0 ] === $win.width() && dimensions[ 1 ] === $win.height() ) { //if they are the same, then we are no longer resizing the window clearInterval( myInterval ); //deactivate the interval myInterval = false; //use it as a flag doStuff(); //call your callback function } else { dimensions[ 0 ] = $win.width(); //else keep the new dimensions dimensions[ 1 ] = $win.height(); } }, 64 ); //and perform a check every 64ms } });
source share