Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1156818
    LewisWallis
    Participant

    On the portfolio pages of the website that I’m building (please see portfolio here) the filter button doesn’t work on the iPad. I haven’t checked any other mobile devices yet.

    The reason it has stopped working is because I introduced a bit of javascript to hide the filter drop down once a filter option has been clicked. Otherwise the dropdown remained down and got in the way. It works fine on my desktop computer but when I tried it on my iPad, the filter dropdown works but doesn’t let you choose anything, instead it just selects the link of what’s beind the dropdown menu and navigates away from the page.

    The javascript that I’m using is:

    jQuery(function($) {
    $(‘.x-portfolio-filters-menu li a’).on( “click touchend”, function() {
    $(‘.x-portfolio-filters-menu’).css(‘display’,’none’);
    });
    });

    Perhaps a solution is for the above javascript to be ignored on screens of iPad size and smaller. If that is the best solution then how do I modify the above code so that it only targets larger screen sizes? If you have another option so that it works on all screen sizes that would be better still.

    Many thanks

    Lewis

    #1156865
    Christian
    Moderator

    Hey Lewis,

    Regretfully, issues arising from custom development are outside the scope of our support. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/

    Thank you for understanding.

    #1156887
    LewisWallis
    Participant

    Hi, I got the above Javascript code from a member of the X staff via another forum post, so it wasn’t something that I developed myself. The X team have been incredibly helpful and have given me the exact code required to perform modifications to php files or visual amendments via css. I feel that this question isn’t a big ask compared to other far more complicated questions that I’ve asked previously, I just want to know how to modify a bit of javascript so that it only targets larger screens. Sorry if I’ve come across rude, I was just surprised that you weren’t able to provide an answer for this particular question.

    Many thanks

    Lewis

    #1156904
    LewisWallis
    Participant
    #1156944
    Joao
    Moderator

    Thanks for letting us know Lewis,

    Reach us if you need help with anything else,

    Joao

  • <script> jQuery(function($){ $("#no-reply-1156818 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>