Skip to content

Instantly share code, notes, and snippets.

@arschmitz
Created April 1, 2015 14:46
Show Gist options
  • Save arschmitz/433ee125663a0714db41 to your computer and use it in GitHub Desktop.
Save arschmitz/433ee125663a0714db41 to your computer and use it in GitHub Desktop.
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: The mobile namespace on the jQuery object
//>>label: Namespace
//>>group: Core
define([ "jquery" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $ ) {
$.mobile = {};
if ( !$.fn.enhance ) {
$.fn.enhance = $.noop;
}
$.fn.enhance.initGenerator = function( widgetName, initSelector ) {
var primarySelector = initSelector || "[data-" + $.mobile.ns + "role='" + widgetName + "']";
return ":not( :not( " + primarySelector + ") ):not( [data-" + $.mobile.ns + "role='none'], [data-" +
$.mobile.ns + "enhance='false'] :not( :not( " + primarySelector + " ) ) )";
};
}( jQuery ));
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
//>>excludeEnd("jqmBuildExclude");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment