getting the direct content of an html element encapsulated in a jquery object
- by codergeek
I have an piece of html in a jquery object. When I say $(this).html() I get:
<span class="value">4</span><span class="type">teaspoons</span>butter
I want to get only the piece of text from this html segment that is not in the spans. in this example, it is butter.
How do I get that?
Thanks!