私はこのjsコードを持っています:
(function($, undefined) {
$("a").click(function(event) { //or another elemtnt
alert('Hello!');
})
})(jQuery);
そしてもちろんリンク:
<a href="http://google.ru/" target="_blank">Google</a>
JS コードは機能しませんが、次のように変更すると:
(function($, undefined) {
$("*").click(function(event) {
alert('Hello!');
})
})(jQuery);
すべての作品!