views:

63

answers:

3

I need to run a script every time a table is resized (whenever the user resizes the browser window). Does anyone know how this can be done?

+3  A: 
function myFunction() {
    alert('resized');
}

window.onresize = myFunction;
Ken Browning
+4  A: 
window.onresize = function(){alert('test');}
DCrystal
+1  A: 

If you use Jquery,

$(window).resize(function() {

alert("test now");

});