mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-25 02:10:28 +00:00
jQuery core style guide conformance: jquery.mobile.widget.js
This commit is contained in:
parent
afe76dc340
commit
fcc874eb93
1 changed files with 10 additions and 3 deletions
|
|
@ -4,20 +4,27 @@
|
|||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
(function($, undefined ) {
|
||||
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.widget", {
|
||||
_getCreateOptions: function() {
|
||||
|
||||
var elem = this.element,
|
||||
options = {};
|
||||
|
||||
$.each( this.options, function( option ) {
|
||||
|
||||
var value = elem.jqmData( option.replace( /[A-Z]/g, function( c ) {
|
||||
return "-" + c.toLowerCase();
|
||||
} ) );
|
||||
return "-" + c.toLowerCase();
|
||||
})
|
||||
);
|
||||
|
||||
if ( value !== undefined ) {
|
||||
options[ option ] = value;
|
||||
}
|
||||
});
|
||||
|
||||
return options;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue