How can I return click again after disabling it?
For instance, when the page is loaded I want to turn off all clickable button on the menu,
$(".menu > ul > li > a").click(function(){return false;});
after 3 seconds later, I want to turn them back on, so I am doing this,
var timeout = setTimeout(function() {
$(".menu > ul > li > a").click(function(){return true;});
}, 3000 );
it does not work of course! How can I fix this?
You would be better off binding and unbinding the event handler
http://api.jquery.com/unbind/