Tweaked the jqdata selector regexp so that it wasn't so greedy. This will allow for multiple jqdata() and other pseudo selectors that use parens withinthe same selector string.

This commit is contained in:
Kin Blas 2011-03-18 08:42:24 -07:00
parent 4fca8e6d21
commit 882c27c03f

View file

@ -243,7 +243,7 @@
var oldFind = jQuery.find;
jQuery.find = function( selector, context, ret ) {
selector = selector.replace(/:jqdata\((.*)\)/g, "[data-" + (jQuery.mobile.ns || "") + "$1]");
selector = selector.replace(/:jqdata\(([^)]*)\)/g, "[data-" + (jQuery.mobile.ns || "") + "$1]");
return oldFind.call( this, selector, context, ret );
};