Solved

jquery Age Slider Bar

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

27 Experts available now in Live!

Get 1:1 Help Now