Add method for Element. #72

Open
wants to merge 4 commits into
from

Conversation

Projects
None yet
1 participant
@fntz

fntz commented Oct 2, 2012

I added method that returns the text content of element.

For example:

  <div id="element">Lorem<span>ipsum</span> dolore</div> 

  $('element').content(); // returns text for element and nested elements
  //=> Lorem ipsum dolore
  $('element').content(true); // returns text only for element without nested elements. 
  //=> Lorem dolore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment