Deanznet Posted December 5, 2010 Share Posted December 5, 2010 How do i get this javascript code to work without clicking a button? //BOX LOGIN ERROR TEST// $("#content-login .errors").hide(); $("#error").click(function() { $("#box-login").show('shake', 55); $(".header-login").show('shake', 55); $("#content-login .error").show('blind', 500); return false; }); Im trying to use it so i can echo the error in php ? Link to comment https://forums.phpfreaks.com/topic/220770-how-do-i-get-this-javascript-code-to-work-without-clicking-a-button/ Share on other sites More sharing options...
Lautarox Posted December 5, 2010 Share Posted December 5, 2010 <script> $("#box-login").show('shake', 55); $(".header-login").show('shake', 55); $("#content-login .error").show('blind', 500); return false; </script> Should work. You could also use the .ready() function to load that when the body is loaded. Link to comment https://forums.phpfreaks.com/topic/220770-how-do-i-get-this-javascript-code-to-work-without-clicking-a-button/#findComment-1143409 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.