Subway schrieb: > Hi, > > I have some hidden information on my page that I readout with html(). The > info info are HTML comments that look like this: > > <div class="redentry_dark" id="s_item_6"> > <!-- 31352 6 --> > <div id="overlight"> > ... > > Now in Firefox html() takes the whole: > > <!-- 31352 6 --> > <div id="overlight"> > ... > > But in Safari it just takes: > > <div id="overlight"> > ... > > So I can't readout the hidden information like that in Safari. > > Of course I could go and put that same info into a hidden div, but I'm > wondering if there's another solution to this problem and maybe that's a bug > of jQuery? > > Fredi
You could access the comment node, it should be a node as every other node. Here's an outline (not tested): var nodes = $('#s_item_6').get(0).getElementsByTagName('*'); for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; if (node.nodeType == COMMENT_NODE) { alert(node.nodeValue); break; } } Not sure if that is supported by Safari at all... -- Klaus _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/