I have a variable which contains text and a tag. When appending variable to the element the tag isnt interpreted as a tag. Instead its interpreted as text.
Take this example:
var translationWrapper = $("<div class='list-label'></div>");
translationWrapper.html('<span> test </span>');
var translationContent = "";
translationContent += 'Testtext <em> test </em>';
translationWrapper.append(translationContent);
If I do this. The em tag isn't interpreted as a tag. Instead its interpreted as text. How can I let it interpret the tag ?
append(..)takes a String, the documentations gives an example$( ".inner" ).append( "<p>Test</p>" );. I ran your code in a fiddle and it seems to work fine.