0

I want a use a Dual Slider (Range) HTML control, similar to the JQuery dual Slider, without having to load a huge JavaScript framework just to use it.

Does such a dual slider control exist, that is light weight (filesize) and doesn't require me loading any JavaScript frameworks?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
TeddyR
  • 1,213
  • 3
  • 12
  • 13
  • Check out the answers in this thread: http://stackoverflow.com/questions/877530/javascript-range-slider-dual-slider-exist-without-using-a-framework – Adrian J. Moreno Jul 07 '10 at 21:00
  • 1
    I don't think jquery is huge. A lot of websites take advantage of a Javascript Library (or Framework ^_^), you should too. That's my two cents...Will I take a -1 ? – Nicolo' Verrini Jul 07 '10 at 21:00
  • jquery isn't huge, and may be already downloaded by the user from google: http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/ – Yuriy Faktorovich Jul 07 '10 at 21:03
  • @iKnowKungFoo, all of the answers on that linked question are for using an JS framework. So this doesn't help me. Thanks though – TeddyR Jul 07 '10 at 21:05
  • @BalusC, initially - it appears that it doesn't require any frameworks. But when I went to download the code and demo, it required the use of a 80kb custom framework + another 60kb slider class. So I wouldn't call that option "light weight" at all. – TeddyR Jul 08 '10 at 01:41

2 Answers2

1

The simplest solution might be to use jQuery and the closure compiler. I believe the closure compiler will actually remove code that is not used. I have never actually tried this, so YMMV.

Matt Evanoff
  • 966
  • 4
  • 9
  • what is the "closure compiler"? Do you mean Google Closure? If so, how does it evaluate my HTML code to inspect to see what JQuery components I'm loading / not loading? – TeddyR Jul 07 '10 at 21:17
  • 1
    I mean googles closure compiler http://code.google.com/closure/compiler/. As for how it does it, it looks at your code to see what is used and what it not, and gets rid of what is not. I can't really give a better description than that as I have not looked into it very extensively. – Matt Evanoff Jul 07 '10 at 21:26
0

Your simplest answer is to use an interpreted language, server side construct or a framework. No alternative to your requested solution. Your asking html to do something it is not intended to do natively. You are also asking that the browsers support features for which they are not natively built to support without compilations, interpretations and math services built in.

Your best bet is to link in to the jquery object from google (@ around 52kbps) your not asking for alot of your users. Only other option is to use Flash which is twice the problem and 1/2 the fun.