This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

issue with the slider

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36838
    germankygermanky
    Participant

    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

    #36850
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.