Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Doesn't seem to work. Okay, what about only HTML? document.getElementById('test').innerHTML = '<a href="google.com">a cool link</a>'; - doesn't seem to work either. Commented Jul 28, 2012 at 20:31
  • Of course it works - you need jQuery loaded and the file has to be local to your server! Your last example also should work Commented Jul 28, 2012 at 20:32
  • Solved it. Had to move jQuery include above the script. No idea why this matters, never had this problem... Commented Jul 28, 2012 at 20:50