Getting innerText to work in Firefox and return/set only first node of jQuery.text()
Firefox uses the W3C-compliant textContent property instead of innerText. Most other browsers, such as Chrome and IE, use innerText and, to make things worse, IE does not support innerText. Also, when using jQuery.text(), all text inside the node plus its child nodes are returned, which is not the same as innerText or textContent. To get around this, I wrote a small jQuery plug-in. The code (function( $ ) { $.fn.innerText = function(text) { var ff = (typeof this[0].
read more