Return to Snippet

Revision: 29368
at July 28, 2010 04:42 by TonyBentley


Updated Code
$.fn.hovr = function(clss){
	$(this).live("mouseover",function(){
		$(this).addClass(clss);
	});
	$(this).live("mouseout",function(){
		$(this).removeClass(clss);
	});
	return this;
}

Revision: 29367
at July 28, 2010 04:41 by TonyBentley


Initial Code
$.fn.tclass = function(clss){
	$(this).live("mouseover",function(){
		$(this).addClass(clss);
	});
	$(this).live("mouseout",function(){
		$(this).removeClass(clss);
	});
	return this;
}

Initial URL


Initial Description
Pass in whatever class will apply the hover style;\r\n\r\n$(\"div.hover\").hovr(\"hoverHover\") \r\n\r\nwould act like a cross browser version of \r\ndiv.hover{color:blue} div.hover:hover{text-decoration:underline}\r\n\r\nwhich would be in css for the jquery plugin hovr:\r\n\r\ndiv.hover{color:blue}\r\n\r\ndiv.hoverHover{text-decoration:underline}

Initial Title
x-browser:hover

Initial Tags


Initial Language
jQuery