$(".test").live("click", function(){
alert('yes');
});
Source: http://www.ibm.com/developerworks/web/library/wa-aj-advjquery2/index.html
$('.no_download').bind('contextmenu', function(e){ e.preventDefault(); });
Note: for an image which is also a link, the class has to be applied to the image (not to the link):
<a href="..."> <img class="no_download" src="..." /> </a>
Javascript
$("a[rel='external']").click(function(){ this.target = "_blank"; });
HTML
<a rel="external" href="http://google.com"> Google </a>
Example: element after a div hidden dynamically by hide() is stretched. Solution: use toggle().
$(this).find("tbody > tr").filter(":odd").addClass("highlight");