jQuery aのイベントでリンクさせない処理2

2010年04月19日(月)

参考
http://semooh.jp/jquery/cont/doc/event/

eventオブジェクト.preventDefault()でブラウザの初期アクションをキャンセルできるそうです。
前述のreturn falseの方がお手軽な気がします。
使いどころだと思います。

$("#test a").click(function (e) {
 e.preventDefault();
}

http://blog.macaroniworks.net/2010/03/jquery-aのイベントでリンクさせない処理/