Skip to content

Element values and IE #3

@group131

Description

@group131

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions