Jquery and search form problem
<p>I can't get my jquery code to clear my search form when a user clicks in the search field can someone tell me what I'm doing wrong?</p>

<p>Jquery </p>

<pre><code>$('#text').focus(function () {
    if ($(this).val() == $(this).attr("title")) {
        $(this).val("");
    }
}).blur(function () {
    if ($(this).val() == "") {
        $(this).val($(this).attr("title"));
    }
});


$("#searchForm").submit(function() {
    $("#text").each(function() {
        if($(this).val() == this.title) {
    $(this).val("");
    }
    });
});
</code></pre>

<p>html5 code</p>

<pre><code>&lt;header id="header"&gt;
&lt;div id="header-con"&gt;
    &lt;h1&gt;
        &lt;a href="" title=""&gt;&lt;img src="" alt="" /&gt;&lt;/a&gt;
    &lt;/h1&gt;

    &lt;nav id="nav"&gt;
        &lt;ul&gt;
            &lt;li&gt;a href="" title=""&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;a href="" title=""&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;a href="" title=""&gt;&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;
                &lt;form method="post" action="" id="searchForm"&gt;
                    &lt;fieldset&gt;
                        &lt;input type="text" name="search" size="38" value="Search..." title="Search..." id="text" /&gt;
                        &lt;input type="submit" name="submit" value="Search" id="sbutton" /&gt;
                    &lt;/fieldset&gt;
                &lt;/form&gt;             
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/nav&gt;
&lt;/div&gt;
&lt;/header&gt;
</code></pre>
