phdphd Posted November 1, 2015 Share Posted November 1, 2015 Hi all. I have some jquery that adds a class to siblings on hover and removes it when hovering ends. So this works [selector_syntax].hover( function(){$(this).parent().parent().siblings().addClass('fade');}, function(){$(this).parent().parent().siblings().removeClass('fade');} ) But this does not. [selector_syntax].hover( function(){$(this).parent().parent().siblings().addClass('fade');}, setTimeout(function(){$(this).parent().parent().siblings().removeClass('fade');}, 3000); ) Thanks for you help! Quote Link to comment Share on other sites More sharing options...
Solution Ch0cu3r Posted November 3, 2015 Solution Share Posted November 3, 2015 Use Jquery's delay method rather than setTimeout to remove the fade class Quote Link to comment Share on other sites More sharing options...
phdphd Posted December 11, 2015 Author Share Posted December 11, 2015 thanks! Quote Link to comment 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.