Simplify javascript.
[platal.git] / plugins / compiler.checkpasswd.php
index 57e99b3..d396b23 100644 (file)
@@ -40,7 +40,7 @@ function smarty_compiler_checkpasswd($tag_attrs, &$compiler)
                 var passwordprompt_name = '.  $prompt . ';
                 var passwordprompt_submit = ' . $submit . ';
                 $(":input[name=' . $prompt . ']").keyup(function(event) { checkPassword(event.target, ' . $text . '); });
-                $(document).ready(function() {
+                $(function() {
                   checkPassword($(":input[name=' . $prompt . ']").get(0), ' . $text . ');
                 });
               //]]></script>