我正在尝试为我的项目实现一个模式弹出窗口,我在 jsfiddle 中找到了我想要的。我可以找出他们用于模态的 html 和 css 是什么,但我不知道他们使用的是什么 js?
你能告诉我他们在模态中使用什么 javascript 吗?那就是当我单击登录按钮时,模式弹出窗口打开
http://jsfiddle.net/VSsLC/embedded/result/
这是下面的html代码
<div class="modal hide fade" id="login-modal" style="display: none;">
<a class="close" data-dismiss="modal">×</a>
<h1>Log in to Kippt</h1>
<form class="connect-button" name="login" method="post" action="/social/twitter/redirect/" id="twitter-connect-form">
<div style="display:none"><input type="hidden" name="csrfmiddlewaretoken" value="MNH48hjwVMrGUWcpNqIt4qa1nko6RWdo"></div>
<a href="#" onclick="$('#twitter-connect-form').submit(); return false;" class="signup-twitter signup-btn" id="twitter_button"><i></i>Log in with Twitter</a>
</form>
<form class="connect-button" name="login" method="post" action="/social/facebook/redirect/" id="facebook-connect-form">
<div style="display:none"><input type="hidden" name="csrfmiddlewaretoken" value="MNH48hjwVMrGUWcpNqIt4qa1nko6RWdo"></div>
<a href="#" onclick="$('#facebook-connect-form').submit(); return false;" class="signup-facebook signup-btn" id="facebook_button"><i></i>Log in with Facebook</a>
</form>
<form action="/login" method="POST" autocomplete="off"><div style="display:none"><input type="hidden" name="csrfmiddlewaretoken" value="MNH48hjwVMrGUWcpNqIt4qa1nko6RWdo"></div>
<fieldset>
<h5>or with Kippt account</h5>
<input type="text" placeholder="Username or email" name="username" maxlength="30" id="id_username">
<input type="password" placeholder="Password" name="password" id="id_password">
<input type="submit" value="Log in" class="btn">
</fieldset>
<a href="/accounts/password/reset/"><span>Forgot password?</span></a> · <a href="/signup/"><span>Sign up to Kippt</span></a>
</form>
</div>