JQuery - error with element non-focusable / how to force blur?
<p>I have an html form which uses jquery focus and blur in order to clear and restore some preset field text. However, the form is in a modal dialog which can be hidden and shown using jquery hide() and show(). However, when the form is hidden, it is throwing a javascript error:</p>

<pre><code>an invalid form control with name = 'email' is not focusable
</code></pre>

<p>I'm assuming this is because the form is hidden and can't be accessed. Is there a way to force a blur event? Or some way to resolve this error? Here's my code:</p>

<pre><code>$j('.dField').focus(function(){
    clearInput($j(this)[0]); //The [0] seems to be necessary to retrieve the element at the DOM object level
});
$j('.dField').blur(function(){
    restoreInput($j(this)[0]);
});

function clearInput(textField) {
    if (textField.value == textField.defaultValue) {
        textField.value = "";
     }
}

//Restores the default value
function restoreInput(textField){
    if (textField.value == ""){
        textField.value = textField.defaultValue;
    }
}

$j('#dFormBack').click(function(){
        $j('#dContentContainer').show();
        $j('#vehicle_form').hide();
    });
</code></pre>
