I need to create a custom volume slider for a WMP object. The current slider is complicated to modify, and use, is there a simple way to generate a slider on an HTML page that can have it's value passed to a javascript function?
$.fn.button
from Twitter Bootstrap, so watch out. –
Alphonso hey i've just created my own JS slider because I had enough of the heavy Jquery UI one. Interested to hear people's thoughts. Been on it for 5 hours, so really really early stages.
$.fn.button
from Twitter Bootstrap, so watch out. –
Alphonso HTML 5 with Webforms 2 provides an <input type="range">
which will make the browser generate a native slider for you. Unfortunately all browsers doesn't have support for this, however google has implemented all Webforms 2 controls with js. IIRC the js is intelligent enough to know if the browser has implemented the control, and triggers only if there is no native implementation.
From my point of view it should be considered best practice to use the browsers native controls when possible.
A simple slider: I have just tested this in pure HTML5, and it's so simple !
<input type="range">
It works like a charm on Chrome. I've not tested other browsers yet.
<input type="range">
inside an html file, and browse this file in a browser that accepts HTML5. You would see a simple slider. –
Maharashtra Here is another light JavaScript Slider that seems to fit your needs.
script.aculo.us has a slider control that might be worth checking out.
There's a nice javascript slider, it's very easy to implement. You can download the zip package here: http://ruwix.com/javascript-volume-slider-control/
p.s. here the simplified version of the above script:
The lightweight MooTools framework has one: http://demos.mootools.net/Slider
I recommend Slider from Filament Group, It has very good user experience
Here is a simple slider object for easy to use
The Carpe Slider has newer versions also:
v1.5 carpe_ambiprospect_slider
v2.0b ...slider/drafts/v2.0/
The code below should be enough to get you started. Tested in Opera, IE and Chrome.
<script>
var l=0;
function f(i){
im = 'i' + l;
d=document.all[im];
d.height=99;
document.all.f1.t1.value=i;
im = 'i' + i;
d=document.all[im];
d.height=1;
l=i;
}
</script>
<center>
<form id='f1'>
<input type=text value=0 id='t1'>
</form>
<script>
for (i=0;i<=50;i++)
{
s = "<img src='j.jpg' height=99 width=9 onMouseOver='f(" + i + ")' id='i" + i + "'>";
document.write(s);
}
</script>
document.write
, the <center>
element - it's like 1999 all over again! –
Ace © 2022 - 2024 — McMap. All rights reserved.
<input type="range">
Try it! – Communist