Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Mobile Widget: check data-defaults prop and skip checking data- attri…
Browse files Browse the repository at this point in the history
…butes if true
  • Loading branch information
arschmitz committed Sep 24, 2013
1 parent 78eeba3 commit c56bc51
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions js/jquery.mobile.widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit c56bc51

Please sign in to comment.