<p>Getting started with jquery and having trouble getting hello world type example going for asp.net mvc. I get a runtime error "object expected" when trying to load a page with this script. </p>

<p>A. Where should script tags be placed in a master page?
B. What might I be doing wrong? There are definitely "a" elements in my page?</p>

<pre><code>&lt;script src="../Scripts/jquery-1.2.6.min.js" type="text/javascript"&gt;&lt;/script&gt;

            &lt;script src="../Scripts/jquery.corner.js" type="text/javascript"&gt;&lt;/script&gt;

            &lt;script type="text/javascript"&gt;
                $(document).ready(function() {
                    $("a").click(function(event) {
                        alert("Thanks for visiting!");
                    });
                });
            &lt;/script&gt;
</code></pre>

Hmmm ...
To answer your first question:  They should be put in the
```
<head>
```
element.
Also, usually I use the
'bind' method
when sinking events in the DOM (like it looks like you're trying to do).
So, code would look like:
```
```
$(document).ready(function()
{
    //  Bind each link to a handler:
    $("a").bind('click dblclick', function(event)
    {
         alert('click');
    })
});
```
```
Also, a few design tips (since you're working with something close to my heart (ASP.NET MVC with jQuery):
Add an extra 'ContentPlaceHolder' at the bottom of your master page's
```
<head>
```
element.  This will allow you to have page specific javascript run in it's proper location:  in the 'head' section of the page, and it'll allow you to make page-specific javascript includes.
It'll look something like this:
```
```
<asp:ContentPlaceHolder ID="HeadContent" runat="server" />
</head>
```
```
Why is this useful?
I'll tell you:  That jQuery rounded corners plugin you're using might only be used on a few pages -- why include it on every page?