Skip to main content

Bug Tracker

Side navigation

#8932 closed bug (invalid)

Opened April 21, 2011 07:48AM UTC

Closed April 21, 2011 09:05AM UTC

Slider range bug: always 1 off

Reported by: robin@vakantiehuizen-frankrijk.nl Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

Dealing with the following problem on the page http://www.vakantiehuizen-frankrijk.nl/vakantiehuis-frankrijk

I've included three sliders on that page, but I face the following bug:

1. When dragging the slider he seems to be 1 off. Please try the "sterren"-slider to see if yourself. If you drag the left slider to the right you'll see that nothing changes in the first 'step', the second step changes the value to "1".

On-page Javascript:

<script type="text/javascript">
		$(document).ready(function(){	
			
			$(".priceslider").slider({ 
				range: true, 
				min: 0, 
				max: iCurrentSliderPriceMax,
				change: function(e,ui) { 
					$(".qualityBox em#prijs_min").html($(".priceslider").slider("values", 0));
					$(".qualityBox em#prijs_max").html($(".priceslider").slider("values", 1));
				}
			});
			
		        $(".sterslider").slider({ 
				range: true, 
				min: 0, 
				max: 5, 
				change: function(e,ui) { 
					$(".qualityBox em#ster_min").html($(".sterslider").slider("values", 0));
					$(".qualityBox em#ster_max").html($(".sterslider").slider("values", 1));
				}
			});

		        $(".cijferslider").slider({ 
				range: true, 
				min: 0, 
				max: 10, 
				change: function(e,ui) { 
					$(".qualityBox em#cijfer_min").html($(".cijferslider").slider("values", 0));
					$(".qualityBox em#cijfer_max").html($(".cijferslider").slider("values", 1));
				}
			});
		});
 		var sProtocol = "http";		
</script>

HTML

<!--  / quality box \\ -->

<div class="qualityBox">

        <h3>Kwaliteit</h3>
 
	<script type="text/javascript">
		var iSliderPriceMin = 0;
		var iSliderPriceMax = iCurrentSliderPriceMax;
	</script>

        <h4><span>Min <em id="prijs_min">0</em> - Max <em id="prijs_max">5500</em></span> Prijs in EURO</h4>

        <div class="priceslider"></div>
 
	<script type="text/javascript">
	        var iSliderStarsMin = 0;
		var iSliderStarsMax = 5;
	</script>

        <h4><span>Min <em id="ster_min">0</em> - Max <em id="ster_max">5</em></span> Aantal sterren</h4>

        <div class="sterslider"></div>

        <script type="text/javascript">
                var iSliderRatingMin = 0;
                var iSliderRatingMax = 10;
        </script>

        <h4><span>Min <em id="cijfer_min">0</em> - Max <em id="cijfer_max">10</em></span> Beoordelingscijfer</h4>

        <div class="cijferslider"></div>
</div>

<!--  \\ quality box / -->
Attachments (0)
Change History (1)

Changed April 21, 2011 09:05AM UTC by ajpiano comment:1

resolution: → invalid
status: newclosed

Thank you for your time and interest in helping the jQuery project, but this tracker is only for jQuery Core bugs, not jQuery UI. Please report jQuery UI bugs on the jQuery UI Bug Tracker, and provide a testcase on jsfiddle.net to allow the ticke to be audited.