So I\'ve seen three ways to add html/DOM elements to a page. I\'m curious what the pros and cons are for each of them.
1 - Traditional JavaScript
If you are using jQuery 1.4 the best way is the following:
$("", { id: 'example-link', href: 'http://www.example.com/', text: 'Example Page' }).appendTo("body");