javascript/jquery- how to check, if an element has text attribute or not
<p>Is there some way of determining at run time, if an element returns value for element.text() or not? Using javascript or jquery?</p>

<p>I.E. some way of checking if an element is pure text, or it is some other type of element?</p>

<p>Why I need a solution to the above--- </p>

<p>I am trying to parse through some complicated forms with totally different coding styles (in the way, for example, text values for elements of a radio button may be enclosed in label tags, or they may be directly given, or they may be enclosed in span tags, and so on...)</p>

<p>So I need to parse the form with the form id as wrapper, </p>

<p>now if the text value for a radio button is enclosed in span, and current selected element is radio button, then next element will be the span tag (opening) which I want to do nothing with and move on. The one after that will be the text, and this I want to obtain using this.text().</p>

<p>Hence the whole question...</p>
