Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This seems to of fixed the problem, but is no doubt more of a hack:</p> <pre><code>var next_move = "show"; $(document).ready(function () { // Touch device fix to prevent submenu being shown during initial load $('#sub-menu').css("display","block"); $("#show-investment-type-nav").click(function() { if (Modernizr.mq('screen and (max-width: 480px)')) { $('#sub-menu').slideToggle(100); if (next_move === "show") { $("body").addClass("nav-active"); $("#site-nav #icon").empty().html("&amp;#59236;"); $("#site-nav #nav-margin-down").animate({"margin-top": "163"}, 100); next_move = "hide"; } else { $("body").removeClass("nav-active"); $("#site-nav #icon").empty().html("&amp;#59238;"); $("#site-nav #nav-margin-down").animate({"margin-top": "0"}, 100); next_move = "show"; } } }); function doneResizing() { if (Modernizr.mq('screen and (min-width: 481px)')) { // Hide submenu $("#sub-menu").hide(); // Reset margin for li tags if screen expanded whilst nav open $("#site-nav #nav-margin-down").css("margin-top","0"); $("#show-investment-type-nav").hover(function() { $(this).find("#sub-menu").stop(true, true).slideDown("fast"); }, function () { $(this).find("#sub-menu").stop(true, true).fadeOut("fast"); }); } else if (Modernizr.mq('screen and (max-width: 480px)')) { // Fixes issue on touch device when you touch away from expanded submenu...this took forever!!! $('#sub-menu').slideUp(100); $("#site-nav #nav-margin-down").animate({"margin-top": "0"}, 100); // To make sure if nav expanded, so next_move ="hide", hover event doesn't hide() submenu if (!Modernizr.touch) { $("#show-investment-type-nav").hover(function() { $("#sub-menu").hide(); if (next_move === "hide") { $("#sub-menu").show(); } }); } next_move = "show"; } } var id; $(window).resize(function () { clearTimeout(id); id = setTimeout(doneResizing, 0); }); doneResizing(); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload