Browse files

Optimized selecting all child elements and self.

  • Loading branch information...
1 parent 99cadc5 commit fc750f25637a12cafc3fca9eae7feb80988462b6 @tentonaxe committed Sep 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 jquery.highlighttext.js
View
2 jquery.highlighttext.js
@@ -95,7 +95,7 @@
// iterate through each matched element
return this.each( function() {
// select all contents of this element
- $( this ).add( $( this ).find( "*" ) ).contents()
+ $( this ).find( "*" ).andSelf().contents()
// filter to only text nodes that aren't already highlighted
.filter( function () {

0 comments on commit fc750f2

Please sign in to comment.