jQuery Function Not Working

Hi all, I’m a little stuck on the following code. I have a button that when clicked, I want to change the content of a DIV. Please see my code below. I’m connecting to the library as I’m using a few others bits and pieces of jQuery.

function addtoBasket(id){
    $(".productDescription").html("Hello World :)");

<input type="button" value="&nbsp;" name="cartadd" id="buyNow" onclick="addtoBasket(464)">

Functions wrapped in an anonymous function cannot be used outside of it, simple remove the jQuery DOM ready method and it will work fine.