EasyUI Forum
September 14, 2025, 12:39:58 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: slider: is it possible to click on the ruler and let the handle moves with it?  (Read 16909 times)
kudoof
Newbie
*
Posts: 21


View Profile
« 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
Logged
kudoof
Newbie
*
Posts: 21


View Profile
« Reply #1 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!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #2 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
Logged
kudoof
Newbie
*
Posts: 21


View Profile
« Reply #3 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.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #4 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>
Logged
kudoof
Newbie
*
Posts: 21


View Profile
« Reply #5 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.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #6 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){...}
});
Logged
kudoof
Newbie
*
Posts: 21


View Profile
« Reply #7 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){...}
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!