jquery - how to apply event.stopPropagation? -
Let me explain this problem first. I am using the following UL structure
& lt; Ul onmouseover = "smenu_over (this)" onmouseout = "smenu_out (this)" class = "sub-menu" style = "left: 0;" & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Wrap the navigation item text with long text & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub NIT Items & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub NIT Items & lt; / A & gt; & Lt; / Li & gt; & Lt; Li style = "border-bottom: 0;" & Gt; & Lt; A href = "#" & gt; Sub-Neighborhood Items & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;
JS function
function smenu_over (obj) {var a = obj.parentNode.childNodes [0]; If (a! = Null) {var top = $ ("topnav_icons") Length & amp; Amp; ! $ ("._log_t") length? "-45px": "-34px"; SetBckPosition (A, Top); A.style.color = "#fff"; }}
I need to implement event.stopPropagation inside this function called what is a mouseover event.
Please help the code to apply event.stopPropagation?
Thank you in advance.
You mean:
$ ('ul.sub -menu a '). Mousecenter (function) {event.stopPropagation (); // your code ....});
Comments
Post a Comment