点击切换动画时出现问题
我正在构建的 jQuery 导航有一些问题。当您单击“查找邮政编码”时,邮政编码查找器应该会下降到 175 像素,然后当再次单击时,会飞回到 90 像素。
该套件第一次使用效果非常好,但不久之后就卡在了 90 像素。经过一番尝试后,它连续播放两个动画,没有中断,没有点击。有谁知道我做错了什么?预先感谢您的帮助。
$(document).ready(function() {
$('a#find-zip').click(function(event) {
$("div#zip-drop").toggle().stop().animate( { top: 180 }, { duration: 'slow', easing: 'easeOutBack'})
$("div#zip-drop").toggle().stop().animate( { top: 90 }, { duration: 'slow', easing: 'easeOutBack'})
});
I am having some issues with this jQuery nav I am building. When you click "Find zip", the zip code finder is supposed to fall down to 175px, then when clicked again, fly back up to 90px.
This set used work perfectly the first time, however it got stuck at 90px shortly there after. After a little playing around, it plays both animation consecutively, no break, no click. Does anyone know what I am doing wrong? Thanks in advance for the help.
$(document).ready(function() {
$('a#find-zip').click(function(event) {
$("div#zip-drop").toggle().stop().animate( { top: 180 }, { duration: 'slow', easing: 'easeOutBack'})
$("div#zip-drop").toggle().stop().animate( { top: 90 }, { duration: 'slow', easing: 'easeOutBack'})
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)