EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: kudoof on July 03, 2013, 07:44:30 AM



Title: slider: is it possible to click on the ruler and let the handle moves with it?
Post by: kudoof on July 03, 2013, 07:44:30 AM
Just like a regular scroll bar,  when  you click on the empty area, the handle moves quickly to that area and snap to it finally.

Something similar 
http://jqueryui.com/slider/#default


Title: Re: slider: is it possible to click on the ruler and let the handle moves with it?
Post by: kudoof on July 03, 2013, 08:13:32 AM
Also, if I want to align the slider to the bottom of its div (I don't need the tick marks),  which css property should I change?  Thanks!


Title: Re: slider: is it possible to click on the ruler and let the handle moves with it?
Post by: stworthy on July 03, 2013, 07:53:01 PM
Just like a regular scroll bar,  when  you click on the empty area, the handle moves quickly to that area and snap to it finally.

Please download the updated slider plugin from http://www.jeasyui.com/easyui/plugins/jquery.slider.js


Title: Re: slider: is it possible to click on the ruler and let the handle moves with it?
Post by: kudoof on July 21, 2013, 07:44:34 AM
Where should I put this file on disk and how to include in the header? 

By itself the slider does not render and using it together with the 'jquery.easyui.min.js' doesn't make a difference.
I am also using other elements like tooltips etc.


Title: Re: slider: is it possible to click on the ruler and let the handle moves with it?
Post by: stworthy on July 21, 2013, 08:20:28 AM
Try this:
Code:
	<script type="text/javascript" src="../../jquery.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
<script type="text/javascript" src="http://www.jeasyui.com/easyui/plugins/jquery.slider.js"></script>


Title: Re: slider: is it possible to click on the ruler and let the handle moves with it?
Post by: kudoof on July 21, 2013, 02:50:49 PM
Thanks. The next question follows is that how do I use these click events?  I would like to use the onSlideEnd instead of onChange for my app because the latter triggers too many ajax requests, but was unable to get it working.


Title: Re: slider: is it possible to click on the ruler and let the handle moves with it?
Post by: stworthy on July 21, 2013, 08:12:59 PM
The 'onSlideEnd' event only fires when the user has dragged the slider's thumb and drop it. Please try to use the 'onComplete' event that will get always called, no matter dragging the thumb or clicking the slider.
Code:
$('#ss').slider({
  onComplete:function(value){...}
});


Title: Re: slider: is it possible to click on the ruler and let the handle moves with it?
Post by: kudoof on July 22, 2013, 11:56:05 AM
Cool!  Thanks for the quick replies.   

The 'onSlideEnd' event only fires when the user has dragged the slider's thumb and drop it. Please try to use the 'onComplete' event that will get always called, no matter dragging the thumb or clicking the slider.
Code:
$('#ss').slider({
  onComplete:function(value){...}
});