Help with a slider from jQuery

im trying to input the value from this slider to my imp


Donation amount ($50 increments):

I edited your post to wrap the code in code tags (which you can do with “C” button above the text entry box.

It’s difficult to say what’s wrong without seeing the rest of your HTML.

You need the jQueryUI stylesheet, as well as some elements in your html’s body:


Slider Example

Donation amount ($50 increments):

	<div id="slider" style="width: 450px;"></div>

here is the agent

You have multiple definitions for a few of the JS libraries you’re using - you want to make sure there is only 1 definition per library, or else things can get really weird (which is what’s happening here).

thanks but i still cant figgure out how to send the value of the slider to my imp just making it post in the server log would be amazing at this point

I’ve used jQuery sliders for color pickers and servo control. Here is some old code that I made for pan and tilt… two sliders.

one thing that is key is to use the ‘stop’ event to trigger the action of either the console log or sending to the agent. I did not see this in your May 2 code.

The example from user MakeDeck appears to be using this. The important bit is here. I copied that code and tested it just now - at least to the point of getting a message to the console.

$(function() { $( '#slider-vertical' ).slider({ orientation: 'vertical', range: 'min', min: 0, max: 100, value: 50, step: 10, stop: function( event, ui ) { $( '#tilt' ).val( ui.value );//updates a text box tilt(ui.value); console.log(ui.value);//debugging } });