So I had to do it all day, but not a good Js Coder is being led me here. When I click on the link according to "test.html" in the dropdown menu, nothing happens. It does not take anywhere, even if the browser clearly shows that this "test.html" link is active on the hoverway. Here JS code. And it's a part of the menu. If anyone has the right snippet to add a mistake in the code or I am very happy! It is due to this line of code This goes to this block and returned which is Also The object is There will be a better probe to check the length Code
is up timeout = 500; Win cell = 0; Var ddmenuitem = 0; Ceremony headermenu_open (event) {headermenu_canceltimer (); Headermenu_close (); Var submenu = $ (this) .fund ('ul'); If (submenu) {ddmenuitem = submenu.css ('visibility', 'visible'); return false; } Back true; } Function headermenu_close () {if (ddmenuitem) ddmenuitem.css ( 'visibility', 'hidden');} function headermenu_timer () {closetimer = window.setTimeout (headermenu_close, timed);} function headermenu_canceltimer () {if (closetimer ) {Window.clearTimeout (Collier); closetimer = null;}} bind $ (document) .ready (function () {$ ( '# headermenu Lee') bind ( 'click', headermenu_open) ;. $ ( '# headermenu & gt; Li.) (' Mouseout, Hederman_taimr); $ ( '# Hedermanu & gt; li "). bind (' mouseover ', Hedermankakalteltr);}); Document.onclick = headermenu_close;
& lt; Ul id = "headermenu" & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Whittalere & lt; / A & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "page / test html" & gt; Test & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt;
if ( Submenu) {ddmenuitem = submenu.css ('visibility', 'visible'); return false; }
e.previted default () and
e.stopPropagation () due to which the link does not follow.
if (submenu) / / Return True y value .. because it is an empty jQuery
if (subMenu.length)
function headermenu_open (event) {event.stopPropagation (); // Prerequisites Need to Prevent Headermenu_canceltimer (); Headermenu_close (); Var submenu = $ (this) .fund ('ul'); If (submenu length) {ddmenuitem = submenu.css ('visibility', 'visible'); return false; } Back true; }
Wednesday, 15 April 2015
javascript - Link in JS dropdown menu does not redirect -
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment