Merge branch 'master' of github.com:jquery/jquery
This commit is contained in:
commit
f6f1cc77f4
4 changed files with 45 additions and 14 deletions
|
@ -2022,6 +2022,27 @@ test("delegate with submit", function() {
|
|||
jQuery(document).undelegate();
|
||||
});
|
||||
|
||||
test("undelegate() with only namespaces", function(){
|
||||
expect(2);
|
||||
|
||||
var $delegate = jQuery("#liveHandlerOrder"),
|
||||
count = 0;
|
||||
|
||||
$delegate.delegate("a", "click.ns", function(e) {
|
||||
count++;
|
||||
});
|
||||
|
||||
jQuery("a", $delegate).eq(0).trigger("click.ns");
|
||||
|
||||
equals( count, 1, "delegated click.ns");
|
||||
|
||||
$delegate.undelegate(".ns");
|
||||
|
||||
jQuery("a", $delegate).eq(1).trigger("click.ns");
|
||||
|
||||
equals( count, 1, "no more .ns after undelegate");
|
||||
});
|
||||
|
||||
test("Non DOM element events", function() {
|
||||
expect(1);
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ test("is(String|undefined)", function() {
|
|||
});
|
||||
|
||||
test("is(jQuery)", function() {
|
||||
expect(24);
|
||||
expect(23);
|
||||
ok( jQuery('#form').is( jQuery('form') ), 'Check for element: A form is a form' );
|
||||
ok( !jQuery('#form').is( jQuery('div') ), 'Check for element: A form is not a div' );
|
||||
ok( jQuery('#mark').is( jQuery('.blog') ), 'Check for class: Expected class "blog"' );
|
||||
|
@ -83,7 +83,6 @@ test("is(jQuery)", function() {
|
|||
ok( !jQuery('#en').is( jQuery('[lang="de"]') ), 'Check for attribute: Expected attribute lang to be "en", not "de"' );
|
||||
ok( jQuery('#text1').is( jQuery('[type="text"]') ), 'Check for attribute: Expected attribute type to be "text"' );
|
||||
ok( !jQuery('#text1').is( jQuery('[type="radio"]') ), 'Check for attribute: Expected attribute type to be "text", not "radio"' );
|
||||
ok( jQuery('#text2').is( jQuery(':disabled') ), 'Check for pseudoclass: Expected to be disabled' );
|
||||
ok( !jQuery('#text1').is( jQuery(':disabled') ), 'Check for pseudoclass: Expected not disabled' );
|
||||
ok( jQuery('#radio2').is( jQuery(':checked') ), 'Check for pseudoclass: Expected to be checked' );
|
||||
ok( !jQuery('#radio1').is( jQuery(':checked') ), 'Check for pseudoclass: Expected not checked' );
|
||||
|
@ -223,10 +222,6 @@ test("closest(Array)", function() {
|
|||
same( jQuery("body").closest(["span","html"]), [{selector:"html", elem:document.documentElement, level:2}], "closest([body, html])" );
|
||||
});
|
||||
|
||||
<<<<<<< HEAD
|
||||
test("not(Selector|undefined)", function() {
|
||||
expect(11);
|
||||
=======
|
||||
test("closest(jQuery)", function() {
|
||||
expect(8);
|
||||
var $child = jQuery("#nothiddendivchild"),
|
||||
|
@ -243,9 +238,8 @@ test("closest(jQuery)", function() {
|
|||
ok( $child.closest( $body.add($parent) ).is('#nothiddendiv'), "Closest ancestor retrieved." );
|
||||
});
|
||||
|
||||
test("not(Selector)", function() {
|
||||
expect(7);
|
||||
>>>>>>> 1a167767305202797cf4c839eb64bd7adfb00182
|
||||
test("not(Selector|undefined)", function() {
|
||||
expect(11);
|
||||
equals( jQuery("#main > p#ap > a").not("#google").length, 2, "not('selector')" );
|
||||
same( jQuery("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" );
|
||||
same( jQuery("p").not("#ap, #sndp, .result").get(), q("firstp", "en", "sap", "first"), "not('selector, selector')" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue