View Single Post
Old 02-17-2013, 09:47 PM   PM User | #9
Haidar
Regular Coder

 
Join Date: Jan 2010
Posts: 105
Thanks: 18
Thanked 0 Times in 0 Posts
Haidar has a little shameless behaviour in the past
Quote:
Originally Posted by VIPStephan View Post
Well, as it mentioned and as the documentation for hover() says that function is/was a shortcut for mouseenter() and mouseleave(), so that’s what you should use instead.

I still wonder why they didn’t mention the deprecation of hover() in the documentation.
Like this or :P?

Code:
	$(function(){
		$('#tag-hover').mouseenter()(
    	function(){
    		$('div.tag-font').stop(true, true).fadeOut(100, function(){
    			$('div.tag-image').stop(true, true).fadeIn(400);						 
    		});
    	},
    	function(){
		$('#tag-hover').mouseleave()(
    		$('div.tag-image').fadeOut(400, function(){
    			$('div.tag-font').fadeIn(100);						 
    		});
    	}
    	);
});
Haidar is offline   Reply With Quote