Solved

jquery Age Slider Bar

Posted on 2013-10-31
4
1,008 Views
Last Modified: 2013-11-01
I'm trying to style this slider bar to match the image I've attached.  I have it working now but not sure how to add the boxes that float above the slider as in the image.

Here is my current code:
http://jsfiddle.net/gallitin/mRMPv/

Here is the image I need to modify it to function as with the boxes above the slider.
1.jpg
0
Comment
Question by:N R
  • 2
4 Comments
 
LVL 25

Assisted Solution

by:Kyle Hamilton
Kyle Hamilton earned 500 total points
ID: 39615348
http://jsfiddle.net/mRMPv/20/

You'll need to style it to your liking

here's another:
http://jsfiddle.net/mRMPv/26/
0
 
LVL 11

Author Comment

by:N R
ID: 39615749
@kozaiwaniec thanks that's exactly what I was looking for.  I'll work with styling it on my own.  I'll take a look at the code you've added and see if I can decipher how it's working for future reference.  Thanks again for the help.
0
 
LVL 25

Accepted Solution

by:
Kyle Hamilton earned 500 total points
ID: 39615854
hi guys,

Sorry, I didn't have time to explain earlier.

so basically, I've created two elements with jquery which will contain the values of the left and right of the slider. I gave them class names so they can be styled in CSS outside of the javascript. I could have used one element and one class name, but I left them both in so you can tweak the positions to be centered over the handles individually.

They are then dynamically inserted into each slider handle ( using eq(0) for the first handle, and eq(1) for the second handle - eq is the index of the element in the jquery array of elements). Within the slider options object, I set the text of each new element to the slider values.

One additional piece in the CSS adds the word AGE inside each item - this way AGE will not be replaced by the text of the value. You could have some nested elements with the word AGE, but this is simpler. The only downside would be if you needed to dynamically localize your page, and then it would kind of suck.

Anyway, that's kind of it in a nutshell. if you need/desire further explanation please let me know.

Koza.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now