Skip to content

Commit

Permalink
added firstChild and lastChild since latest slick supports it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerio Proietti committed Dec 5, 2012
1 parent 019f04e commit 1d3605d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/traversal.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ $.implement({

children: walk(">", "find"),

firstChild: walk("^", "find"),

lastChild: walk("!^", "find"),

parent: function(expression){
for (var i = 0, node; node = this[i]; i++) while ((node = node.parentNode)){
if (!expression || slick.matches(node, expression)) return $(node)
Expand Down

0 comments on commit 1d3605d

Please sign in to comment.