Skip to content
Permalink
Browse files

Merge branch 't5476' of https://github.com/jitter/jquery into jitter-…

…t5476
  • Loading branch information...
jeresig committed Dec 6, 2010
2 parents d4a9d45 + 5c0b5d2 commit df3441bac79c7a0530c7c88c1740936599bcba94
Showing with 6 additions and 6 deletions.
  1. +1 −1 src/core.js
  2. +5 −5 test/unit/core.js
@@ -215,7 +215,7 @@ jQuery.fn = jQuery.prototype = {
this.toArray() :

// Return just the object
( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
( num < 0 ? this[ this.length + num ] : this[ num ] );
},

// Take an array of elements and push it onto the stack
@@ -547,15 +547,15 @@ test("toArray()", function() {
})

test("get(Number)", function() {
expect(1);
expect(2);
equals( jQuery("p").get(0), document.getElementById("firstp"), "Get A Single Element" );
strictEqual( jQuery("#firstp").get(1), undefined, "Try get with index larger elements count" );
});

test("get(-Number)",function() {
expect(1);
equals( jQuery("p").get(-1),
document.getElementById("first"),
"Get a single element with negative index" )
expect(2);
equals( jQuery("p").get(-1), document.getElementById("first"), "Get a single element with negative index" );
strictEqual( jQuery("#firstp").get(-2), undefined, "Try get with index negative index larger then elements count" );
})

test("each(Function)", function() {

0 comments on commit df3441b

Please sign in to comment.
You can’t perform that action at this time.