I want to unbind the anchor after the first click, but when user click a specific button, I want to rebind the click event to this anchor
I wrote this code
$(document).ready(function(){
$("a.package").click(function(){
//alert('click');
$(this).unbind('click');
// the rest of the code
});
$('#activate').click(function(){
$('a.package').bind('click');
// the rest of the code
});
});
the unbind function works well, but the bind function does not work, why? and how to make it work?