Forums

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

Home Forums JavaScript Dropdown tab issue on mobile

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #274275
    therockstar
    Participant

    Good day everyone,

    I’m having werid issue on mobile.

    I want the dropdown menu to open for user to select the categories or sort by anything and user should able to close the menu back by using the same button. However when I tab to close the menu I have to do double tab the button on mobile.

    Here is the link: https://htc1.hometesterclub.com/au/en/Reviews please view it using mobile

    Here is my javascirpt:

        $(function () {
            $(".dropdown").on("show.bs.dropdown", function (e) {
                $(this).attr('closable', false);
            });
    
            $(".dropdown").on("hide.bs.dropdown", function (e) {
                return $(this).attr('closable') == 'true';
            });
    
            $(".btn-review-filter").on('click', function () {
                $(this).parent().attr('closable', true);
            });
        });
    

    Thanks in advance.

    #274277
    chris_2080
    Participant

    try to add “touch”$(".btn-review-filter").on('click touch', function () {

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