Fixed bug #178
This commit is contained in:
parent
43d3deb7c8
commit
1293e80ff9
1 changed files with 11 additions and 9 deletions
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
|
@ -1917,6 +1917,7 @@ jQuery.extend({
|
||||||
sibling: function(elem, pos, not) {
|
sibling: function(elem, pos, not) {
|
||||||
var elems = [];
|
var elems = [];
|
||||||
|
|
||||||
|
if(elem) {
|
||||||
var siblings = elem.parentNode.childNodes;
|
var siblings = elem.parentNode.childNodes;
|
||||||
for ( var i = 0; i < siblings.length; i++ ) {
|
for ( var i = 0; i < siblings.length; i++ ) {
|
||||||
if ( not === true && siblings[i] == elem ) continue;
|
if ( not === true && siblings[i] == elem ) continue;
|
||||||
|
@ -1926,6 +1927,7 @@ jQuery.extend({
|
||||||
if ( siblings[i] == elem )
|
if ( siblings[i] == elem )
|
||||||
elems.n = elems.length - 1;
|
elems.n = elems.length - 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return jQuery.extend( elems, {
|
return jQuery.extend( elems, {
|
||||||
last: elems.n == elems.length - 1,
|
last: elems.n == elems.length - 1,
|
||||||
|
|
Loading…
Reference in a new issue