//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); //>>description: Degrades inputs to another type after custom enhancements are made. //>>label: Degrade Inputs define( [ "jquery", "jquery.mobile.page" ], function( $ ) { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { $.mobile.page.prototype.options.degradeInputs = { color: false, date: false, datetime: false, "datetime-local": false, email: false, month: false, number: false, range: "number", search: "text", tel: false, time: false, url: false, week: false }; //auto self-init widgets $( document ).bind( "pagecreate create", function( e ){ var page = $.mobile.closestPageData($(e.target)), options; if( !page ) { return; } options = page.options; // degrade inputs to avoid poorly implemented native functionality $( e.target ).find( "input" ).not( page.keepNativeSelector() ).each(function() { var $this = $( this ), type = this.getAttribute( "type" ), optType = options.degradeInputs[ type ] || "text"; if ( options.degradeInputs[ type ] ) { var html = $( "