Accessing text

Accessing text

Current implementation of .text() does not give to access the text value of a node EXCLUDING the text value of its children. Suggestion is to implement a new method, i.e. .nodeText(), that would allow accessing or changing the text of selected node(s) only, leaving children intact.

Effectively, the method would operate on:

$(this)[0].firstChild.textContent;