Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-23-2012, 07:24 AM   PM User | #1
SloPrimus
New to the CF scene

 
Join Date: May 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
SloPrimus is an unknown quantity at this point
Need help with jQuery slider

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);
        }
});

Last edited by VIPStephan; 05-23-2012 at 10:06 AM.. Reason: added framework title prefix
SloPrimus is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:39 PM.


Advertisement
Log in to turn off these ads.