我在点击时使用一个简单的 jquery 函数显示一个隐藏的登录 div。
function showLog(){
$('#signin_menu').slideDown();
}
当用户在框外单击时,我将如何编辑它以隐藏 div?
div html(如果需要)
<div id="signin_menu" >
<p>
<label for="email">Email</label>
<input type="email" name="email" id="email" tabindex="4" title="email">
</p>
<p>
<label for="password">Password</label>
<input type="password" name="password" id="password" title="password" tabindex="5">
</p>
<p class="remember">
<input type="button" class="button-link" name="submit" style="cursor:pointer" id="submit" value="Log In" onclick="logMeIn()" tabindex="6">
<input id="remember" name="remember_me" value="1" tabindex="7" type="checkbox">
<label for="remember">Remember me</label>
</p>
</div>