issue with the slider

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36838
    germanky
    germanky
    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 Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.