jQUery
prevent form submission.
$('#edit_user_form').submit(function(){
$("textarea[name = user_form_snippet]").enabled = enabled;
return false;
e.preventDefault();
});
Below is my rails form.
<%form_for @user, :html {:id => "edit_user_form" },
:url => {action => "update", :id => @user.id} do |f| %>
<% end %>
My jQuery
function is getting called, but for strange reason the form is getting submitted even if use either return false
or e.preventDefault()