Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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 11:06 AM. Reason: added framework title prefix


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •