I can’t control how the HTML is generated and need to put a string of links into a list and then add new links for each item.
I have simplified the code at http://jsfiddle.net/jhASu/ and it works in Chrome/Firefox and IE9 but not in IE 7 and 8 (no new links are generated). What could be the cause of this?
Thanks in advance.
http://jsfiddle.net/jhASu/11/
This works I would extract your function a little bit more though: This only adds the anchor to one like you wanted based on the preset value.