jquery-mobile/js/jquery.mobile.widget.js
scottjehl a24196e550 dolla dolla bills y'all.
Fixes #126, Fixes #346
2010-11-11 10:50:28 -05:00

25 lines
647 B
JavaScript

/*
* jQuery Mobile Framework : widget factory extentions for mobile
* Copyright (c) jQuery Project
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function($, undefined ) {
$.widget( "mobile.widget", {
_getCreateOptions: function() {
var elem = this.element,
options = {};
$.each( this.options, function( option ) {
var value = elem.data( option.replace( /[A-Z]/g, function( c ) {
return "-" + c.toLowerCase();
} ) );
if ( value !== undefined ) {
options[ option ] = value;
}
});
return options;
}
});
})( jQuery );