$('#target').click(function() { alert('Handler for .click() called.'); }); Code (markup): I want #target = all <a href=""> links How to.. example, after click any a href link = alert.. This is, thanks
<script> $('a:link').click(function() { alert('Handler for .click() called.'); }); </script> <a href="#test">Test</a> Code (markup): No working;
If you want only the ones with an href, you could use $("[href]") If you only want those with a link of #test, use $("[href='#test']")