Permalink
Browse files

Mobile Widget: check data-defaults prop and skip checking data- attri…

…butes if true
  • Loading branch information...
arschmitz committed Sep 24, 2013
1 parent 78eeba3 commit c56bc519c755aa03ae9119d507d60aa31c107a79
Showing with 7 additions and 4 deletions.
  1. +7 −4 js/jquery.mobile.widget.js
View
@@ -22,10 +22,13 @@ $.extend( $.Widget.prototype, {
elem = this.element[ 0 ],
options = {};
- for ( option in this.options ) {
- value = $.mobile.getAttribute( elem, option.replace( rcapitals, replaceFunction ) );
- if ( value != null ) {
- options[ option ] = value;
+ //
+ if( !$.mobile.getAttribute( elem, "defaults" ) ){
+ for ( option in this.options ) {
+ value = $.mobile.getAttribute( elem, option.replace( rcapitals, replaceFunction ) );
+ if ( value != null ) {
+ options[ option ] = value;
+ }
}
}

0 comments on commit c56bc51

Please sign in to comment.