Jquery向下滑动登录菜单不起作用
我需要为我的登录屏幕创建一个下拉菜单。 这是我的代码,但它不工作 Jquery:Jquery向下滑动登录菜单不起作用,jquery,Jquery,我需要为我的登录屏幕创建一个下拉菜单。 这是我的代码,但它不工作 Jquery: $('document').ready(function () { $('#login').click(function () { $('form').slideDown(); }); }); Html: 登录 用户名: 密码: 单击#打开,您需要打开表单: 对于该添加显示:首先在表单中无 并为#打开创建单击事件,并在该事件切换形式中: Html: 单击#打开
$('document').ready(function ()
{
$('#login').click(function ()
{
$('form').slideDown();
});
});
Html:
登录
用户名:
密码:
单击#打开,您需要打开表单:
对于该添加显示:首先在表单中无
并为#打开创建单击事件,并在该事件切换形式中:
Html:
单击#打开,您需要打开表单:
对于该添加显示:首先在表单中无
并为#打开创建单击事件,并在该事件切换形式中:
Html:
<div id="login">
<p id="open">Login</p>
<form>
<p>
<label for="username">Username:</label>
<input type="text" name="username" id="username">
</p>
<p>
<label for="password">Password: </label>
<input type="text" name="password" id="password">
</p>
<p>
<input type="submit" name="button" id="button" value="Submit" >
</p>
</form>
</div>
<div id="login">
<p id="open">Login</p>
<form style="display:none;">
<p>
<label for="username">Username:</label>
<input type="text" name="username" id="username">
</p>
<p>
<label for="password">Password: </label>
<input type="text" name="password" id="password">
</p>
<p>
<input type="submit" name="button" id="button" value="Submit" >
</p>
</form>
</div>
$( document ).ready(function() {
$('#open').click(function ()
{
$('form').slideDown();
});
});