Skip to content

Commit

Permalink
fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
codylindley committed Oct 23, 2012
1 parent ff90f37 commit aac57f7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ A wishful, likley naive, jQuery inspired DOM Library for use in modern ES5 brows
* Be easy to update or change by keeping the code simple, readable, and heavily commented so at the very least the code teaches.
* Be jQuery-like in its plugin architecture but with the heart of zepto.js.
* Be fixable by mere humans with some JavaScript chops
* Be a vaiable solution for inclusion in other micro libraries that require sophisticated (beyond what the native dom api offers) DOM manipulation and nothing else

---

Expand Down Expand Up @@ -158,9 +159,9 @@ hippo().children(selector) //all children
hippo().childrenUntil(selector)

hippo().ancestors(selector) //all ancestors elements
*hippo().ancestorsUntil(selector)
hippo().ancestorsUntil(selector)
hippo().descendants(selector) //all descendants elements
*hippo().descendantsUntil(selector) //all descendants elements
hippo().descendantsUntil(selector) //all descendants elements
hippo().siblings(selector) //all sibling elements
```

7 changes: 3 additions & 4 deletions grunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ module.exports = function(grunt) {
jshint: {
options: {
"evil": true,
"regexdash": true,
"browser": true,
"wsh": true,
"regexdash":true,
"browser":true,
"wsh":true,
"curly":true,
"eqnull":true,
"expr":true,
"noarg":true,
"quotemoark":"single",
"trailing": true,
"smarttabs":true,
"trailing":true,
"undef":true,
Expand Down
20 changes: 11 additions & 9 deletions source/traversing.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ contains methods for operating on elements
**/

/**
clone element nodes in hippo object
get all ancestors elements filter by selector
@method ancestors()
@for hippo()
Expand All @@ -28,11 +28,13 @@ hippo.fn.ancestors = function(selector){
}
});
});

//remove any duplicate elements, reverse list so closes ancestor is first, fitler if needed
return hippo(this.length === 1 ? list.reverse() : hippo.uniqElements(list.reverse())).filter(selector);
};

/**
clone element nodes in hippo object, until selector
get all ancestors element, until selector
@method ancestorsUntil()
@for hippo()
Expand Down Expand Up @@ -61,7 +63,7 @@ hippo.fn.ancestorsUntil = function(selector){
};

/**
clone element nodes in hippo object
get all descendant elements
@method descendants()
@for hippo()
Expand All @@ -80,7 +82,7 @@ hippo.fn.descendants = function(selector){
};

/**
clone element nodes in hippo object, until selector
get all descendant elements, until selector
@method descendantsUntil()
@for hippo()
Expand All @@ -100,7 +102,7 @@ hippo.fn.descendantsUntil = function(selector){
};

/**
clone element nodes in hippo object
get all parent elements, filter by selector
@method parents()
@for hippo()
Expand Down Expand Up @@ -134,7 +136,7 @@ hippo.fn.parent = function(){
};

/**
get parent element for each element in the set
get parent elements for each element in the set, until selector
@method parentsUntil()
@for hippo()
Expand Down Expand Up @@ -255,7 +257,7 @@ hippo.fn.prevSibsUntil = function(selector){
};

/**
clone element nodes in hippo object
get all siblings
@method siblings()
@for hippo()
Expand Down Expand Up @@ -309,7 +311,7 @@ hippo.fn.childs = function(selector){
};

/**
get child element for each element in the set
get child element for each element in the set, until selector
@method childsUntil()
@param {String} selector
Expand Down Expand Up @@ -346,7 +348,7 @@ hippo.fn.children = function(selector){
};

/**
reduce set to the children elements of each element in the set, until selector
get the children elements of each element in the set, until selector
@method childrenUntil
@for hippo()
Expand Down

0 comments on commit aac57f7

Please sign in to comment.