Created
April 1, 2015 14:23
-
-
Save arschmitz/73ab7a50d20952485ba2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //>>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 first = true, | |
| fullSelector = "", | |
| primarySelector = "[data-" + $.mobile.ns + "role='" + widgetName + "']"; | |
| if ( initSelector ) { | |
| $.each( initSelector.split( "," ), function( index, selector ) { | |
| fullSelector += ( !first ? ", " : "" ) + selector + ":not( [data-" + $.mobile.ns + | |
| "role='none'], [data-enhance='false'] " + selector +" )"; | |
| first = false; | |
| }); | |
| return fullSelector; | |
| } | |
| return primarySelector + ":not( [data-" + $.mobile.ns + "role='none'], [data-" + | |
| $.mobile.ns + "enhance='false'] " + 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