css - make jquery wait before performing the next action -
i have fiddle.
on hover: second div must slide down, third div.
when hover lost: third div must slide up, second div.
how can it?
$(document).ready(function(){ $(".signincontainer").hover(function(){ $(".myprofile").slidetoggle(function(){ $(".logout").slidetoggle(); }); }); });
you can use callback function, that.
$(document).ready(function(){ $(".signincontainer").hover(function(){ $(".myprofile").slidetoggle(function(){ $(".logout").slidetoggle();}); }); });
check out fiddle
if want right order when mouse leaves, this
$(document).ready(function(){ $(".signincontainer").hover(function(){ $(".myprofile").slidedown(function(){$(".logout").slidedown();}); }, function(){ $(".logout").slideup(function(){$(".myprofile").slideup();}); }); });
Comments
Post a Comment