Jump to content

jQuery slider with button controls


Recommended Posts

Hi, I'm trying to create an numbered index that moves up and down with a slider and additionally I'd like it to have button controls that function the same way as the slider. The buttons would move the index up and down and the slider should also move when they are used. This is what I've come up with so far, but my logic might not be correct using this method. Any help would be greatly appreciated. <!DOCTYPE html> <head> <title>UI Stereo Widget Testy Test</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script>$(function() {var x = $('#id_example_1').change(function() {$('#id_value_1').text($(this).val());}); var y = $('#id_example_2').change(function() {$('#id_value_2').text($(this).val());});});</script> </head> <body> <span id="id_value_2" style="font-size: 42px;">0</span><span id="id_value_1" style="font-size: 42px;">0</span> <!--begin slider buttons--><input type="number" min="0" max="250" value="0" style="width:100px; height: 50px;" class="button" id="id_example_2"><input type="number" min="0" max="250" value="0" style="width:100px;" class="slider" id="id_example_1"> <!--end slider buttons--> </body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...