- Posts: 3
- Thank you received: 2
Ask the community, share ideas, and connect with other LimeSurvey users!
$(document).on('ready pjax:scriptcomplete',function() { var thisQuestion = $('#question{QID}'); // SlideStart function $('.form-control', thisQuestion).on('slideStart', function( event ) { $(this).closest('.slider-container').find('.slider-handle').css('background-color', 'red'); console.log($(this).val()); console.log($(this)); console.log($(this).closest(".slider-container").find('.slider-handle')[1]); }); });
Please Log in to join the conversation.
I really don't have any idea her !Any other idea about how to make sure people don't change sliders values by accident while scrolling the page is welcome !
Please Log in to join the conversation.
<script> $(document).on('ready pjax:scriptcomplete',function() { var thisQuestion = $('#question{QID}'); $('.form-control', thisQuestion).on('slideStop', function() { var thisSlider = $(this); setTimeout(function() { thisSlider.closest('.slider-container').find('.slider.slider-horizontal .slider-handle').css('background-color', '#121e15f7'); thisSlider.closest('.slider-container').find('.slider-track').css('background-image', 'linear-gradient(to bottom, #F5F5F5, #F9F9F9)'); thisSlider.closest('.slider-container').find('.slider-selection').css('background-image', 'linear-gradient(180deg,#84b39a 0,#39993f)'); thisSlider.closest('.ls-slider-item-row').find('.control-label').css('color','#444444'); thisSlider.closest('.ls-slider-item-row').find('label').find('span').css('font-size','20px'); console.log( thisSlider.val()); }, 1000); // Waits 1000ms (1 second) }); }); </script> EDIT : And I forgot to thank DenisChenu for cheering up, that was much appreciated :)
Please Log in to join the conversation.