jquery - On mouseleave executed before leaving the element: javascript -


i trying executing mouseenter() , mouseleave() in code,

the problem event mouseleave executed before leaving element,

i trying figure out why happening?

function home(){         $(".light").css("margin-left","440px");         $(".isik").css("margin-left","385px");         $(".isik").parent().attr("href","index.php");     }     function work(){         $(".light").css("margin-left","760px");         $(".isik").css("margin-left","705px");         $(".isik").parent().attr("href","refereanslar.php");     }     function contactus(){         $(".light").css("margin-left","910px");         $(".isik").css("margin-left","855px");         $(".isik").parent().attr("href","iletisim.php");     }     function aboutus(){         $(".light").css("margin-left","600px");         $(".isik").css("margin-left","550px");         $(".isik").parent().attr("href","hakkimizda.php");     }     $(".contactus").mouseenter(function() {         contactus();     })         .mouseleave(function() {             home();         });     $(".work").mouseenter(function() {         work();     })         .mouseleave(function() {             home();         });     $(".aboutus").mouseenter(function() {         aboutus();     })         .mouseleave(function() {             home();         }); 

you can see complete code in link associated,

http://filikaajans.com/test/index.php

the following problem: when mouseenter-event occurs , 2 images, e.g.

$(".light").css("margin-left","760px"); $(".isik").css("margin-left","705px"); 

are placed on actual hovered element, mouse-leave event triggered, because mouse on .isik image.... prove saying: remove isikimage , works...


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -