Skip to content
This repository
Browse code

Merge pull request #4433 from MauriceG/patch-111

Slider: Just create an ID for the label if it lacks
  • Loading branch information...
commit 268ece6ac87f95107b010d22b7439f3901dd554c 1 parent 34c4811
Jason Scott authored May 25, 2012 jasondscott committed May 29, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  js/jquery.mobile.forms.slider.js
6  js/jquery.mobile.forms.slider.js
@@ -37,9 +37,11 @@ $.widget( "mobile.slider", $.mobile.widget, {
37 37
 
38 38
 			controlID = control.attr( "id" ),
39 39
 
40  
-			labelID = controlID + "-label",
  40
+			$label = $( "[for='" + controlID + "']" ),
41 41
 
42  
-			label = $( "[for='"+ controlID +"']" ).attr( "id", labelID ),
  42
+			labelID = $label.attr( "id" ) || controlID + "-label",
  43
+
  44
+			label = $label.attr( "id", labelID ),
43 45
 
44 46
 			val = function() {
45 47
 				return  cType == "input"  ? parseFloat( control.val() ) : control[0].selectedIndex;

0 notes on commit 268ece6

Please sign in to comment.
Something went wrong with that request. Please try again.