jquery-mobile/js/jquery.mobile.widget.js

26 lines
595 B
JavaScript
Raw Normal View History

2010-11-10 00:55:52 +00:00
/*
* jQuery Mobile Framework : widget factory extentions for mobile
* Copyright (c) jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
2010-11-10 00:55:52 +00:00
*/
(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 ) {
2010-10-14 21:37:18 +00:00
return "-" + c.toLowerCase();
} ) );
if ( value !== undefined ) {
options[ option ] = value;
}
});
return options;
}
});
})( jQuery );