jquery - Form with multple submit -
i have form multiple submit. how can found button submitted ?
$("#my_form").live("submit", function(event) { event.preventdefault(); var form_action = $(this).attr("action"); var form_data = $(this).serialize(); // bonton ? $.post( // ... ); return false; });
you can verify using event parameter
$("#my_form").live("submit", function(event) { event.preventdefault(); var form_action = $(this).attr("action"); var form_data = $(this).serialize(); // bonton ? $.post( // ... ); console.log($(event.target)); // button clicked return false;
});
Comments
Post a Comment