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

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 08-07-2011, 01:46 AM   PM User | #1
authorandrew
New Coder

 
Join Date: May 2010
Posts: 79
Thanks: 8
Thanked 0 Times in 0 Posts
authorandrew is an unknown quantity at this point
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
authorandrew is offline   Reply With Quote
Old 08-07-2011, 11:12 PM   PM User | #2
authorandrew
New Coder

 
Join Date: May 2010
Posts: 79
Thanks: 8
Thanked 0 Times in 0 Posts
authorandrew is an unknown quantity at this point
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
authorandrew is offline   Reply With Quote
Old 08-10-2011, 03:30 PM   PM User | #3
authorandrew
New Coder

 
Join Date: May 2010
Posts: 79
Thanks: 8
Thanked 0 Times in 0 Posts
authorandrew is an unknown quantity at this point
Is there no way to get an answer to this problem? I'm about stuck. Any help would be much appreciated.

AA
authorandrew 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 05:00 PM.


Advertisement
Log in to turn off these ads.