mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-05 13:14:45 +00:00
jqm coding style
This commit is contained in:
parent
1aafea83aa
commit
8880ceb431
1 changed files with 8 additions and 8 deletions
|
|
@ -139,21 +139,21 @@
|
|||
|
||||
|
||||
// Monkey-patching Sizzle to filter the :jqmData selector
|
||||
var oldFind = jQuery.find;
|
||||
var oldFind = $.find;
|
||||
|
||||
jQuery.find = function( selector, context, ret, extra ) {
|
||||
selector = selector.replace(/:jqmData\(([^)]*)\)/g, "[data-" + (jQuery.mobile.ns || "") + "$1]");
|
||||
$.find = function( selector, context, ret, extra ) {
|
||||
selector = selector.replace(/:jqmData\(([^)]*)\)/g, "[data-" + ($.mobile.ns || "") + "$1]");
|
||||
|
||||
return oldFind.call( this, selector, context, ret, extra );
|
||||
};
|
||||
|
||||
jQuery.extend( jQuery.find, oldFind );
|
||||
$.extend( $.find, oldFind );
|
||||
|
||||
jQuery.find.matches = function( expr, set ) {
|
||||
return jQuery.find( expr, null, null, set );
|
||||
$.find.matches = function( expr, set ) {
|
||||
return $.find( expr, null, null, set );
|
||||
};
|
||||
|
||||
jQuery.find.matchesSelector = function( node, expr ) {
|
||||
return jQuery.find( expr, null, null, [node] ).length > 0;
|
||||
$.find.matchesSelector = function( node, expr ) {
|
||||
return $.find( expr, null, null, [node] ).length > 0;
|
||||
};
|
||||
})( jQuery, this );
|
||||
|
|
|
|||
Loading…
Reference in a new issue