停止加载链接

 有时候,你既不需要链接到某个特定的网页,也不想要重新加载页面——你可能希望链接做点别的事情,例如说触发一些其他脚本。这就要在阻止默认动作上做文章了:

$('a.no-link').click(function (e) {
  e.preventDefault();
});

 

posted @ 2016-01-12 15:59  侠岚之弋痕夕  阅读(165)  评论(0编辑  收藏  举报
Where is the starting point, we don't have a choice, but the destination where we can pursue!