-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Element values and IE #3
Comments
Thanks. Wanna submit a pull request? |
I would if I knew how. I'm a github noob and it's not like I can use a SVN client to commit code... P.S. Great work btw... |
No worries; I'll incorporate soon. Cheers. |
Same problem exists in setNodeValue too... |
Element values (text) are not displayed in IE (6/7/8). They are in IE9, which supports textContent...
Using something like the following snippet solves the problem:
function _getNodeValue(node){
var $textNodes = _getTextNodes(node);
var textValue = "";
if (node && _isCommentNode(node)) {
textValue = node.nodeValue;
} else if($textNodes[0]) {
//Extra if added to fix IE6/7/8 bug that did not show any element values...
if ($textNodes[0].textContent) {
textValue = $.trim($textNodes[0].textContent);
} else {
//IE6/7/8 case
textValue = $.trim($textNodes[0].text);
}
}
return textValue;
}
The text was updated successfully, but these errors were encountered: