...

View Full Version : jquery: unbind a loaded function



lauthiamkok
09-13-2010, 06:24 PM
Hi,

I have a function which will resize the image background when the page is loaded,


$(document).ready(function(){
loadBackground();
});

and I want to 'unload' or 'remove' this loaded function when I click on a button so that I can load this function anew instead of loading it on top of the page,


$('.get-image').click(function(){
$(window).unbind("resize",loadBackground);
loadBackground();
return false;
});

but I can't make it work! any ideas please?

thanks,
Lau



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum