how to disable link in jquery
my page have a link
<a href="/hyperlink">Hyper link</a>
i want to open a dialog when user click on link.
i want to disable link without remove href event or attribute from him
means no changes in html
then
when 开发者_C百科user click on link then open a dialog
if jquery not load or have a error cause open a link directly.
how i can do this.
$('#myLink').click(function(e) {
e.preventDefault();
//do other stuff when a click happens
});
That may work.
精彩评论