Populating a div

Populating a div

The company I work for recently stared using jQuery, and I need help implementing a fairly simple script. the problem is, I do mostly HTML/CSS and have only a cursory knowledge of JavaScript.

What I'm trying to do is take a div and add some HTML to it. This is so I don't have to go into every page to add it. Basically the footer contains several links and I need to add one. Every page already references a .js file, and the jQuery file.

This is what I have so far, that I got from one of the other designers here who is also new with jQuery:

var foo = $("#foobar").html();
$("foobar").html(foo + "<a href="site/link.html">Hyperlink</a>");


It makes sense but I have no idea about syntax or anything, or if there's anything else that needs to be added. The rest of the JavaScript file is in regular JavaScript, not jQuery.