This is my current code that’s working just fine:
$("h2").html("Well played!");
What if I wanted to link the words “Well played!” to a page of some sort?
I tried doing some different variations of
< a href=””>
…but that simply didn’t work. Any help? 🙂
If you wanted to append the link to the
h2element:Or you could simply use:
Or:
JS Fiddle demo
References:
append().appendTo().html().