index.php
<script type="text/javascript">
$(document).ready(function() {
$("#login").click(function() {
$(".login_box").slideToggle('fast');
});
});
</script>
<div class="login_box" onblur="myFunction()"><br>
Email: <br>
<input type="text" name="judul" size="20"><br><br>
Password:<br>
<input type="password" name="judul" size="20"><br>
<a href="#">Forget Password</a><br><br>
<button type="button" class="button">Sign-in</button>
<button type="button" class="button" onClick="window.location.href = 'http:\index-1.html';">Create Account</button><br>
</div>
This program when someone click the button the login_box appears and if one re-click the button the login_box disappears.
My intention is I would like if someone click the button the login_box appears and if one click any where in the screen the login_box disappears.
How to create program like that. I think I am using jquery.
Thanks in advance.