I have a dom structure like so:
<a>abc<span>def</span></a>
I am wanting to get the text from the <a> tag when I click it.
However when using this.text I get abcdef instead of just abc.
How would I got about getting the text value of just the <a>?
Am I going to have to do it this way and then do a substr() to the length of the <span>‘s text?
Another option: