Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit f86eb665423322511ebba37c8b566ff8dafa2b13 1 parent a77ed1d
@sgrebnov sgrebnov authored
View
4 js/jquery.mobile.forms.select.custom.js
@@ -461,8 +461,8 @@
item.setAttribute('aria-disabled',true);
}
item.setAttribute(dataIndexAttr,i);
- item.setAttribute(dataIconAttr,dataIcon);
- item.setAttribute('class',classes.join(" "));
+ item.setAttribute(dataIconAttr,dataIcon);
+ item.className = classes.join(" ");
item.setAttribute('role','option');
item.setAttribute('tabindex','-1');
item.appendChild(anchor);
View
13 js/jquery.mobile.forms.slider.js
@@ -49,9 +49,9 @@ $.widget( "mobile.slider", $.mobile.widget, {
handle = document.createElement('a');
- domSlider.setAttribute('role','application');
- domSlider.setAttribute('class',['ui-slider ',selectClass," ui-btn-down-",trackTheme,' ui-btn-corner-all'].join(""));
- handle.setAttribute('class','ui-slider-handle');
+ domSlider.setAttribute('role','application');
+ domSlider.className = ['ui-slider ',selectClass," ui-btn-down-",trackTheme,' ui-btn-corner-all'].join("");
+ handle.className = 'ui-slider-handle';
domSlider.appendChild(handle);
var slider = $(domSlider),
@@ -79,8 +79,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
if ( cType == "select" ) {
var wrapper = document.createElement('div');
- wrapper.setAttribute('class','ui-slider-inneroffset');
-
+ wrapper.className = 'ui-slider-inneroffset';
for(var j = 0,length = domSlider.childNodes.length;j < length;j++){
wrapper.appendChild(domSlider.childNodes[j]);
}
@@ -97,9 +96,9 @@ $.widget( "mobile.slider", $.mobile.widget, {
theme = !i ? " ui-btn-down-" + trackTheme :( " " + $.mobile.activeBtnClass ),
sliderLabel = document.createElement('div'),
sliderImg = document.createElement('span');
- sliderLabel.setAttribute('class',['ui-slider-labelbg ui-slider-labelbg-',side,theme," ui-btn-corner-",corners].join(""));
+ sliderLabel.className = ['ui-slider-labelbg ui-slider-labelbg-',side,theme," ui-btn-corner-",corners].join("");
$(sliderLabel).prependTo( slider );
- sliderImg.setAttribute('class',['ui-slider-label ui-slider-label-',side,theme," ui-btn-corner-",corners].join(""));
+ sliderImg.className = ['ui-slider-label ui-slider-label-',side,theme," ui-btn-corner-",corners].join("");
sliderImg.setAttribute('role','img');
sliderImg.appendChild(document.createTextNode(options[i].innerHTML));
$(sliderImg).prependTo( handle );
Please sign in to comment.
Something went wrong with that request. Please try again.