I am trying to traverse XML elements but it is not working in IE8. It is working just fine in Firefox though. And by not working I mean it doesn't go inside the loop even though there are elements.
This is the XML I am trying to traverse:
Here is the code I am using to traverse:
var $anXml = $('<node id="anID" inline="0" leaf="true">'
+'<sub_node1>Text \(more text\)</sub_node1>'
+'<sub_node2>Text \(more text\)</sub_node2>'
Here is the output of alerts:
alert('children before loop: ' + $anXml.children.length);
var $aChild = $(this);
alert('children after loop: ' + $anXml.children.length);
The 'child traversed!' is never displayed.
children before loop: 2
children after loop: 2
Any thoughts would be much appreciated.