I've got some unordered lists and i want to create a link from a list item. It should insert the text of the List Item into a link and replace the former listitem content by the link. I think the problem is a visibility problem of the items. Works fine with firefox, other browsers create empty list items.
HTML:
- <ul>
- <li>Seggl</li>
- <li>Leger</li>
- </ul>
jQuery:
- $('li').each(function() {
- $(this).html('<a href="http://eu.battle.net/wow/de/character/Kil'jaeden/' + $(this).text() + '/simple>' + $(this).text() + '</a>');
- });
Demo:
http://www.whf-guild.com/roster.phpworks fine with firefox but not with other browsers. Is there another way to do this? Would be great. Thx for your ideas