/ Published in: JavaScript
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".
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".
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function(evt) { evt.preventDefault(); }; $('#myLink').click(function(evt){ evt.preventDefault(); $('#myLink').dialog('open'); });