Hi,

I try to use shake effect on jQuery dialog box, but it seems jquery shake the content of the dialog not the dialog box itself when I click the submit button.

what I would like the effect to do is if use enter wrong username or password and after validation then shake the dialog box and display error message on the dialog box. At the moment when I click submit button jquery shake "Login Dialog text" instead of the dialog window.

Could you tell me what I did wrong, please.


I attach the code below.

<div id="loginDialog" title="Login Window">
Login Dialog text
</div>

<script>
function showLogin()
{
$("#loginDialog").dialog('open');
}
$(document).ready(function()
{
$("#loginDialog").dialog({
autoOpen: false,
modal: true,
buttons:
{
Submit: function()
{
$( "#loginDialog" ).effect( "shake" );
}
},
close: function() {
allFields.val( "" ).removeClass( "ui-state-error" );
}
});
})
</script>

Thanks in advance.

Regards
- Haris -