troubleshooting Question

inserting text element based on JQuery UI slider value

Avatar of joshuajohnhutchison
joshuajohnhutchisonFlag for United States of America asked on
JavaScriptProgramming TheoryjQuery
7 Comments1 Solution720 ViewsLast Modified:
Ok, so I am using the jquery ui range slider and I need a "+" to appear in my form field when the slider reaches the maximum value.  For example, my range is from 0 - 100000, so when the slider hits 100000, I want to see "100000+",but when I drop it to 99000 I want the plus sign to go away (I am stepping in intervals of 1000)

I need this to work with the jquery-ui-1.7.2.custom.min.js file you download at the ui site so I can use the theme I rolled.

Anyway, if you could look at my code and tell me what to add, you would be awesome.  Thanks for the help.
//this is what I have so far that works

<script type="text/javascript">
	$(function() {
		$("#slider-range").slider({
			range: true,
			min: 0,
			max: 100000,
			step: 1000,
			values: [0, 100000],
			slide: function(event, ui) {
				$("#range_start").val(ui.values[0]);
				$("#range_end").val(ui.values[1]);
			}
		});
		$("#range_start").val( $("#slider-range").slider("values", 0));
		$("#range_end").val( $("#slider-range").slider("values", 1));
	});
</script>


//body below

<div class="demo">

	<span class="paragraph">Find me all the ships betweeen
	<input name="start_range" type="text" class="table_text" id="start_range" size="7" maxlength="7" />
	and
	<input name="end_range" type="text" class="table_text" id="end_range" size="7" maxlength="7" />
	metric tons dwt.
	</span>

	<div id="slider-range"></div>

</div><!-- End demo -->
ASKER CERTIFIED SOLUTION
Seo_Expert

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros