zepto-range
zepto-range copied to clipboard
Tweaks and improvements
Added support for an array of values as well as a list of values to be sent to range() Added support for a width parameter to be set on the input field Improved handling of layout of slider options Moved styling for slider to it's own stylesheet to make it easier to use in other projects Improved readme documentation on how to use the slider
Your examples are broken http://stormtek.github.io/zepto-range/
Broken in what way?
it looks fine for me ...
Try to open on chrome, firefox... I'm using Chrome Version 27.0.1453.110 on Mac.
im using ff on windows and it looks fine
It looks fine in Firefox on Ubuntu 12.10, Firefox on OSX, but you are right ... it breaks on chrome on both OSX and windows ...
So a styling issue with chrome? Does your original demo work on Chrome?
That is weird, I will look into it further. Cos that is a serious issue ...
Thanks for the heads up by the way :)
also crome on android is brøken. it used to work. Den 19/06/2013 07.33 skrev "stormtek" [email protected]:
So a styling issue with chrome? Does your original demo work on Chrome?
— Reply to this email directly or view it on GitHubhttps://github.com/jcemer/zepto-range/pull/2#issuecomment-19663950 .
So it it a problem with chrome on almost all platforms ... it does work on firefox on all those platforms though
Looking at the generated html, the wrapper div being created has width being set to 0px when we are grabbing the width automatically rather than taking it from the input field value. So we are not getting the general width from the browser for some reason. That makes it a bug in the javascript. Hopefully that should not be too hard to fix.
@stormtek you are trying to get this.input.attr('width')
where it should be this.input.width()
. That's one of the problems.
That is needed to allow the user to define the width of the slider in the input field. The problem is that if that is not specified then it is returning 0 in Chrome. I think I can fix it fairly easily by dropping to this.input.width() if we get 0 from the existing call.
How do I get that change back to the link we are looking at?
That does fix the problem when I run it locally in Chrome on my macbook though
Ok, may just need to wait a few minutes for testing live. But I do believe that is fixed now.
Yea, that is up and working in Chrome on both osx and windows.
the test seams to work now in chrome om android. it is not supposed to fill 100% right? Den 19/06/2013 08.01 skrev "stormtek" [email protected]:
Yea, that is up and working in Chrome on both osx and windows.
— Reply to this email directly or view it on GitHubhttps://github.com/jcemer/zepto-range/pull/2#issuecomment-19664614 .
If there is no wrapper div with a width specified and no width set on the input then it should fill 100%. I have updated the demo to show that with one of the sliders.
beautiful :) you should check description for max parameter. and what does inside do? missing a description? Den 19/06/2013 11.26 skrev "stormtek" [email protected]:
If there is no wrapper div with a width specified and no width set on the input then it should fill 100%. I have updated the demo to show that with one of the sliders.
— Reply to this email directly or view it on GitHubhttps://github.com/jcemer/zepto-range/pull/2#issuecomment-19672053 .
what do you mean by check description for max parameter?
The description for max parameter at the index page is incorrect. The value should be lager than min valmue, not larger by itself. Den 20/06/2013 03.13 skrev "stormtek" [email protected]:
what do you mean by check description for max parameter?
— Reply to this email directly or view it on GitHubhttps://github.com/jcemer/zepto-range/pull/2#issuecomment-19725470 .
I see it now ... stupid eyes filling in what I expect to be there and glossing over what is there ...
How do you set initial value? Is it possible to get 'end value' while the moving is occuring?
Perhaps describe this in readme.md?
I do not believe it is possible to get the 'end value' while the slider is in motion, though I could be wrong. To be honest, I cannot think of a sensible time where you would want to anyway.
I have now adjusted the slider to show the min and max values that are specified in the input field if no options are passed to range(). This makes it more obvious what is going on, and also makes the slider usable even if semantic information is not being presented through custom labels. It also makes it more obvious that the value is being set correctly when the slider is created.
Would it be possible to implement an option to disable legend/bars?
If the range is large and the witdh is small one will get 'one' (what appears to be) one lang white bar below the slider.
It would be nice, if one could only disable the bars, but still keeping min and max legend.