Jquery ui effect


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

function showLogin()
autoOpen: false,
modal: true,
Submit: function()
$( “#loginDialog” ).effect( “shake” );
close: function() {
allFields.val( “” ).removeClass( “ui-state-error” );

Thanks in advance.


  • Haris -