I am trying to create a hyperlink to a facebook webpage within a message bar on my website. Here is my code
var str = "Check us out on facebook";
var result = str.link("https://www.facebook.com/pages/");
$( "#message-bar" ).click(
function() {
$("#message-form").toggle();
if($("#message" ).text() == "Thanks for stopping by mysite.ca!"){
$("#message" ).text(result)
}else{
$("#message-bar").hide();
}
});
Currently after you click the message bar once, instead of displaying the hyperlink it displays the HTML code https://www.facebook.com/pages/"> Check us out on facebook! . So my question is what should I fix to make the actual link appear instead of the code. I've been playing around/ researching the .innerHTML tag although cannot find a working solution. Any input would be apprciated, thanks.