Multiple identical sliders
Hi!
I'm trying to program a little webinterface to control DMX-lights. I'd like to have 24 identical horizontal sliders, how can i achieve this without hardcoding a slider function on each of these 24 div's?
For example, i don't want to write this 24 times but only once:
-
$("#fader1").slider();
$("#fader2").slider();
.....
$("#fader24").slider();
The HTML then would be something like this:
-
<div id="fader1"></div>
<div id="fader2"></div>
....
<div id="fader24"></div>
I'd like to have a more compact javascript code, but it must still be possible to detect which fader has been moved so that i can send the value to my little server application via http.
I hope you understand my problem also because of my not so good english :)
thanks for helping!
Philipp