I'm trying to make a text into a link in my Javascript code. This should work but it doesn't.
var strLink = <a href="xxx" style= "text-decoration:none; color:#fff;">"mysite.com" </a>;
var cb_header = chatbox.find('.imjs-header');
cb_header.html(cb_header.html().replace('{username}', strLink));
I have a variable called username and it is a string. That is the string that used to replace {username}. Maybe I can use jquery? I can't seem to get it a link though. Any pointers in the right direction are greatly appreciated.
Thank you, Arjun