Skip to content
This repository
Browse code

IE7 support: replaced setAttribute('class') with className property

  • Loading branch information...
commit f86eb665423322511ebba37c8b566ff8dafa2b13 1 parent a77ed1d
Sergey Grebnov authored January 25, 2012
4  js/jquery.mobile.forms.select.custom.js
@@ -461,8 +461,8 @@
461 461
 						item.setAttribute('aria-disabled',true);
462 462
 					}
463 463
 					item.setAttribute(dataIndexAttr,i);
464  
-					item.setAttribute(dataIconAttr,dataIcon);
465  
-					item.setAttribute('class',classes.join(" "));										
  464
+					item.setAttribute(dataIconAttr,dataIcon);					
  465
+					item.className = classes.join(" ");
466 466
 					item.setAttribute('role','option');
467 467
 					item.setAttribute('tabindex','-1');
468 468
 					item.appendChild(anchor);					
13  js/jquery.mobile.forms.slider.js
@@ -49,9 +49,9 @@ $.widget( "mobile.slider", $.mobile.widget, {
49 49
 			
50 50
 			handle = document.createElement('a');
51 51
 			
52  
-		domSlider.setAttribute('role','application');
53  
-		domSlider.setAttribute('class',['ui-slider ',selectClass," ui-btn-down-",trackTheme,' ui-btn-corner-all'].join(""));						
54  
-		handle.setAttribute('class','ui-slider-handle');
  52
+		domSlider.setAttribute('role','application');		
  53
+		domSlider.className = ['ui-slider ',selectClass," ui-btn-down-",trackTheme,' ui-btn-corner-all'].join("");		
  54
+		handle.className = 'ui-slider-handle';
55 55
 		domSlider.appendChild(handle);
56 56
 		
57 57
 		var slider = $(domSlider),
@@ -79,8 +79,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
79 79
 
80 80
 		if ( cType == "select" ) {
81 81
 			var wrapper = document.createElement('div');
82  
-			wrapper.setAttribute('class','ui-slider-inneroffset');
83  
-				
  82
+			wrapper.className = 'ui-slider-inneroffset';	
84 83
 			for(var j = 0,length = domSlider.childNodes.length;j < length;j++){
85 84
 				wrapper.appendChild(domSlider.childNodes[j]);
86 85
 			}
@@ -97,9 +96,9 @@ $.widget( "mobile.slider", $.mobile.widget, {
97 96
 					theme = !i ? " ui-btn-down-" + trackTheme :( " " + $.mobile.activeBtnClass ),			
98 97
 					sliderLabel = document.createElement('div'),
99 98
 					sliderImg = document.createElement('span');				
100  
-				sliderLabel.setAttribute('class',['ui-slider-labelbg ui-slider-labelbg-',side,theme," ui-btn-corner-",corners].join(""));
  99
+				sliderLabel.className = ['ui-slider-labelbg ui-slider-labelbg-',side,theme," ui-btn-corner-",corners].join("");
101 100
 				$(sliderLabel).prependTo( slider );
102  
-				sliderImg.setAttribute('class',['ui-slider-label ui-slider-label-',side,theme," ui-btn-corner-",corners].join(""));
  101
+				sliderImg.className = ['ui-slider-label ui-slider-label-',side,theme," ui-btn-corner-",corners].join("");
103 102
 				sliderImg.setAttribute('role','img');
104 103
 				sliderImg.appendChild(document.createTextNode(options[i].innerHTML));
105 104
 				$(sliderImg).prependTo( handle );

0 notes on commit f86eb66

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