Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › issue with the slider › Reply To: issue with the slider
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.