Tagged: x
-
AuthorPosts
-
September 1, 2016 at 8:24 am #1156818
LewisWallisParticipantOn 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
September 1, 2016 at 8:55 am #1156865
ChristianModeratorHey 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.
September 1, 2016 at 9:10 am #1156887
LewisWallisParticipantHi, 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
September 1, 2016 at 9:28 am #1156904
LewisWallisParticipantI have since found a useable solution on this post https://community.theme.co/forums/topic/modify-sort-dropdown-to-go-away-with-a-click-anywhere-on-page/
thanks
Lewis
September 1, 2016 at 9:51 am #1156944
JoaoModeratorThanks for letting us know Lewis,
Reach us if you need help with anything else,
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1156818 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
