Closed KyleMulder closed 11 years ago
Can I have an example of before/after values? I don't understand exactly what you want to do.
Thanks
Well, what I'm trying to accomplish here, is instead of adjusting the left position (if clicked on the right arrow) to make it have an slide effect, instead of just solidly adjusting it.
So in jquery sense:
$('slider').animate({left: +='13px'});
instead of
$('slider').css({left: +='13px'});
Hope this makes sense :)
Ok, I understand. One solution is CSS based (not working on IE): http://jsfiddle.net/ghusse/bxaJh/
Any way to unbind the already click events from the arrows and override with that?
Ok, it's possible but you'll have to create a new widget inheriting from dateRangeSlider, and overwrite default behavior of both _scrollRightClick and _scrollLeftClick functions.
You can take a look at my code for leads: dateRangeSlider is itself iniheriting from rangeSlider, overwriting methods.
Examples: Inheritance declaration: https://github.com/ghusse/jQRangeSlider/blob/master/jQDateRangeSlider.js#L13 Overwritten method, calling base function: https://github.com/ghusse/jQRangeSlider/blob/master/jQDateRangeSlider.js#L30
Implemented it like i would, however i am getting wierd behaviour on the sliding, check out: http://jsfiddle.net/bxaJh/9/
Its very edgy, the slider and labels aren't in parallel.
In chrome, its very smooth, firefox not so much.
I think you should follow my advice and create a new widget inheriting from dateRangeSlider
Im busy working on a project where i am using the Date range slider.
Got requested if its a possibility to make the bar slide when clicking on arrows instead of just adjusting it solidly?