I am looking over the docs on this page. They have examples like these ...
$("p").on("click", function(){
alert( $(this).text() );
});
$("form").on("submit", false)
$("form").on("submit", function(event) {
event.preventDefault();
});
Why is this better or how is it different than this ...
$("p").click(function(){
alert( $(this).text() );
});
$("form").submit(false);
$("form").submit(function(event) {
event.preventDefault();
});
As a final question why would you want to do this ...
$("form").on("submit", function(event) {
event.stopPropagation();
});
instead of ...
$("form").submit(function(event) {
event.preventDefault();
});