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 3 of 3
  1. #1
    New Coder
    Join Date
    May 2010
    Posts
    79
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Set Variable Width on Element with Slider

    Hey all,
    I'm a new Javascript coder; it's still pretty easy for me to get snagged on stuff. Anyways, I had a question for a specific project I've been trying to figure out.

    I have an element set with CSS to a width of 160px. What I want is a way for users to the site to drag a slider back and forth to set the width of the button. Some sort of smooth animation while this is happening would also be nice. I'd also like a way to set a max width on the element.

    So, can this be done? I'm guessing it would use jQuery, but I don't really know.
    Does anyone have any ideas?

    AA

  • #2
    New Coder
    Join Date
    May 2010
    Posts
    79
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I've made a little bit of progress on this. I've nailed down that it should happen with jQuery, and that I can use a slider. What's missing is a way for me for the slider to output a variable which I can then connect to a css value for the element's width. It's the in-between part I need help with.

    Andrew

  • #3
    New Coder
    Join Date
    May 2010
    Posts
    79
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Is there no way to get an answer to this problem? I'm about stuck. Any help would be much appreciated.

    AA


  •  

    Posting Permissions

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