Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery show hide not at all working on mobile devices

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #209574
    ammar
    Participant

    Here is the link to my website.
    Website
    I have applied jquery for hide and show menu items in <b>LOCATIONS</b> menu as u can see in website.
    It is not at all working on mobile devices. By default the list items are hide using CSS.
    I think the event.preventDefault(); is not working fine as it is reloading the page.
    here is my
    JS:

    $("#li_menu169 li.parent.dropdown-submenu.mega-group &gt; a").on('click', function(event) {
    event.preventDefault();
    $('.dropdown-mega.level2').hide("slow");
    if($(this).hasClass('active')) {
    $(this).removeClass('active');
    } else {
    $("li.parent.dropdown-submenu.mega-group &gt; a").removeClass('active');
    $(this).addClass('active');
    $(this).closest('.parent').find('.dropdown-mega.level2').show("hide");
    }
    return false;
    });

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.