I've been trying to trigger an effect through PHP. Basically, when the user enters an invalid password, I want to make the submit button shake. To do that, I need to go through PHP, and attempt to validate the user in my database, if that fails, the following code is supposed to trigger a jQuery effect.
echo'<script>$(".shake").effect("shake", {times:2, distance:3, direction:"right"}, 45);</script>';
I can see why this might not work, but I don't see another way to do it.