I want to disable the link during loading, for the code given below
\"<%= f.add_associated_link(\'Add Task\', @project.tasks.bu
$('#addlink').click(function(e) {
e.preventDefault();
//do other stuff when a click happens
});
return false;
will prevent the default event from occuring and and also prevent the event from bubbling up
So chosing between these two depends on your use. If you want to stop the default action and also need to bubble up the event then use preventDefault