Hy, I'm a newbie in javascript programming and I have problem with jquery slider implementation on my page. While I can get the value of "slider" displayed in <p id="para">, i would like to do something more. Let's say i have value stored in one php variable ($a = 34 and $b = 35 for example). What i would like to do is, how to edit those 2 variables with slider?
For example, slider would start at it's value 50 (1 min., 100 max) in the center. So when i would drag slider to the right (to lets say 60), i would like that my $a variable (34) would now become (44) and while draging all changes in $a variable would be displayed.
Something similar in
http://www.trickybet.net/lay-calculator while draging slider, the existing values "Overall position if win" and
"Overall position if lose" change all the time. How to write function like that?
Thanx for help!
Code:
<div id="divOne" />
<p id="para" />
$(function(){
$(#"divOne").slider({
range: "min",
min: 1,
max:100,
slide:function(event,ui){
$("para").text(ui,value);
}
});