Jquery in IE can't get the whole HTML tag and contents -
i have content <ticker> tags want inject ticker symbols in. ticker tags in html like:
<ticker symbol="aapl">apple</ticker> the expected result is...
apple (aapl) so have jquery code so...
jquery.each($("ticker"), function() { $(this).replacewith($(this).text()+" ("+$(this).attr("symbol")+")"); }); this works fine in firefox , chrome, in ie this:
(aapl)apple</ticker> so when ie grabs $("ticker") element it's taking <ticker symbol="aapl"> tag, not whole element, , replacing string. know work browsers?
<div class="ticker" id="aapl">apple</div> $('.ticker').each(function(){ $(this).html('(' + $(this).attr('id') + ') ' + $(this).html()); });
Comments
Post a Comment