tphgangster Posted February 3, 2010 Share Posted February 3, 2010 I'm creating a menu using jQuery, CSS and Sprites. The jQuery is switching CSS-class on mouseover and mouseout using this code. $("#first").bind("mouseenter",function(){ $(this).removeClass('firstC').addClass('firstCH'); }).bind("mouseleave",function(){ $(this).removeClass('firstCH').addClass('firstC'); }); What i want now is a fadeIn/out effect on the css so that the images don't just pop out. Is there an easy way of doing this, some plug-in for jQuery or something? // tphg Quote Link to comment https://forums.phpfreaks.com/topic/190797-fadeinout-image-with-css-sprites-and-jquery/ Share on other sites More sharing options...
haku Posted February 3, 2010 Share Posted February 3, 2010 http://www.alistapart.com/articles/sprites2/ Quote Link to comment https://forums.phpfreaks.com/topic/190797-fadeinout-image-with-css-sprites-and-jquery/#findComment-1006109 Share on other sites More sharing options...
tphgangster Posted February 4, 2010 Author Share Posted February 4, 2010 Yeah, know about that on. Been working on it for a while now but cant get it to work correctly with my images. But i guess i'll have the same problem with other so... Thanks anyway! Quote Link to comment https://forums.phpfreaks.com/topic/190797-fadeinout-image-with-css-sprites-and-jquery/#findComment-1006913 Share on other sites More sharing options...
tphgangster Posted February 5, 2010 Author Share Posted February 5, 2010 darn, i can't get the menu to work as it suppose to for some reason =/ Quote Link to comment https://forums.phpfreaks.com/topic/190797-fadeinout-image-with-css-sprites-and-jquery/#findComment-1007488 Share on other sites More sharing options...
tphgangster Posted February 13, 2010 Author Share Posted February 13, 2010 Could not make the alistapart-solution work so i tried another one with a jQuery animation-plugin. Worked but not as flexible. Quote Link to comment https://forums.phpfreaks.com/topic/190797-fadeinout-image-with-css-sprites-and-jquery/#findComment-1011763 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.