Hi!
I would like to know how I can rebind the previous behavior of a normal link! example:
function removeDefaultBehaviour(objects){
objects.each(function(){
$(this).data('onclick',$(this).attr('onclick'));
$(this).attr('onclick','return false;');
});
};
function addDefaultBehaviour(objects){
objects.each(function(){
if($(this).data('onclick')!='')
$(this).attr('onclick',$(this).data('onclick'));
});
};
I tried to store the previous behavior in the data object of each link. But this didn't work! Any suggestions, how to restore the previous and default behavior of a link! Thx
Markus