Merge branch 'bug7150' of http://github.com/csnover/jquery
authorJohn Resig <jeresig@gmail.com>
Wed, 13 Oct 2010 01:51:44 +0000 (21:51 -0400)
committerJohn Resig <jeresig@gmail.com>
Wed, 13 Oct 2010 01:51:44 +0000 (21:51 -0400)
src/traversing.js
test/unit/event.js
test/unit/traversing.js
version.txt

index 5a479f2..23116fa 100644 (file)
@@ -4,18 +4,12 @@ var runtil = /Until$/,
        rparentsprev = /^(?:parents|prevUntil|prevAll)/,
        // Note: This RegExp should be improved, or likely pulled from Sizzle
        rmultiselector = /,/,
-       rchild = /^\s*>/,
        isSimple = /^.[^:#\[\.,]*$/,
        slice = Array.prototype.slice,
        POS = jQuery.expr.match.POS;
 
 jQuery.fn.extend({
        find: function( selector ) {
-               // Handle "> div" child selectors and pass them to .children()
-               if ( typeof selector === "string" && rchild.test( selector ) ) {
-                       return this.children( selector.replace( rchild, "" ) );
-               }
-
                var ret = this.pushStack( "", "find", selector ), length = 0;
 
                for ( var i = 0, l = this.length; i < l; i++ ) {
index f2e981e..a51659c 100644 (file)
@@ -1841,7 +1841,7 @@ test("window resize", function() {
                ok( true, "Resize event fired." );
        }).resize().unbind("resize");
 
-       ok( !jQuery(window).data("events"), "Make sure all the events are gone." );
+       ok( !jQuery(window).data("__events__"), "Make sure all the events are gone." );
 });
 
 /*
index f9e7937..0d079f1 100644 (file)
@@ -1,7 +1,7 @@
 module("traversing");
 
 test("find(String)", function() {
-       expect(3);
+       expect(5);
        equals( 'Yahoo', jQuery('#foo').find('.blogTest').text(), 'Check for find' );
 
        // using contents will get comments regular, text, and comment nodes
@@ -9,6 +9,8 @@ test("find(String)", function() {
        equals( j.find("div").length, 0, "Check node,textnode,comment to find zero divs" );
 
        same( jQuery("#main").find("> div").get(), q("foo", "moretests", "tabindex-tests", "liveHandlerOrder", "siblingTest"), "find child elements" );
+       same( jQuery("#main").find("> #foo, > #moretests").get(), q("foo", "moretests"), "find child elements" );
+       same( jQuery("#main").find("> #foo > p").get(), q("sndp", "en", "sap"), "find child elements" );
 });
 
 test("is(String)", function() {
index 3c80e4f..8032ca3 100644 (file)
@@ -1 +1 @@
-1.4.3
\ No newline at end of file
+1.4.3pre
\ No newline at end of file