I want to prevent default link click behavi开发者_C百科or. I want that it should not redirect to that link but just show the link in alert box. I have tried this here.
document.on('click', 'a.AjaxLink', function(event, element) {
alert(element.href);
return false;
});
this should work
document.on('click', 'a.AjaxLink', function(event, element) {
event.stop();
alert(element.href);
});
精彩评论