Return to Snippet

Revision: 53081
at November 13, 2011 01:19 by Barlon


Initial Code
function(evt) {
  evt.preventDefault();
};

$('#myLink').click(function(evt){
  evt.preventDefault();
  $('#myLink').dialog('open');
});

Initial URL

                                

Initial Description
Stop default behaviour from happening.
In the second example we open a jQuery UI dialog instead of going to a different url when clicking on an A-tag with an id of "myLink".

Initial Title
Prevent default behaviour

Initial Tags

                                

Initial Language
JavaScript