Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › issue with the slider
This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko 1 year, 1 month ago.
- AuthorPosts
- February 18, 2022 at 9:38 pm #36838
hi support team, i would like to know if you can help me with this issue
I put the search on a slider https://premiumequipmentusa.com/main-test/ but I am not able to move the price slider, I put the same search below without the banner and the slider works perfect, is there a way to fix that? i would like to be able to use the slider on the banner
please check the video
https://www.loom.com/share/74916513f99b42e592de0267982a1999
I do appreciate the support
February 20, 2022 at 6:51 pm #36850Hi,
The issue is caused by the slider, as it is handling the dragging, and only some elements have exclusivity to not trigger it. Anything else will act as a handle.
I did some googling, and there might be a way of doing this via a custom code by disabling the dragging temporarily, when the mouse is over the handles.
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_action('wp_footer', 'asp_fix_flickity'); function asp_fix_flickity() { ?> <script> jQuery(function($){ $('.asp_w').on('mouseenter touchstart', function(){ $("*[data-flickity-options]").each(function(){ if ( $(this).data('flickity') ) { $(this).data('flickity').options.draggable = false; $(this).data('flickity').updateDraggable(); } }); }).on('mouseleave touchend', function(){ $("*[data-flickity-options]").each(function(){ if ( $(this).data('flickity') ) { $(this).data('flickity').options.draggable = true; $(this).data('flickity').updateDraggable(); } }); }); }); </script> <?php }
Please note, that this may not work in every case. For further improvements, I suggest hiring a developer.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.