Solved

jquery Age Slider Bar

Posted on 2013-10-31
4
1,128 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can't get cursor to change 3 15
Compute age Html 2 23
HTML or/and CSS codes to construct numbered paragraphs. 5 18
Table style position to the left 8 24
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

679 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