jquery cookie for jquery animate
jquery cookie for jquery animate
好的,这是我到目前为止的代码
$(window).load(function() {
$("#notify").animate({top: 0}, 200, null);
//for css positioning prblem
$("#notify").css("position", "relative");
}); // end window load
$(document).ready(function(){
//Hide notify bar
$('.notify-close').click(function(){
$("#notify").slideToggle({top: -100}, 300, function() {
$("#notify").css("position", "absolute");
});
});
});
我怎样才能做到这一点,以便当用户单击带有类的按钮时.notify-close
下一个时间限制,通知栏不会显示。
这将为你工作,
$(window).load(function() {
if($.cookie("mynotifycookie")=="read") {
$("#notify").animate({top: 0}, 200, null);
//for css positioning prblem
$("#notify").css("position", "relative");
}
else {
$("#notify").css("display", "none");
}
}); // end window load
$(document).ready(function(){
//Hide notify bar
$('.notify-close').click(function(){
$.cookie("mynotifycookie", "read", , { expires: 9999 });
$("#notify").slideToggle({top: -100}, 300, function() {
$("#notify").css("position", "absolute");
});
});
});
相关文章:
- 可以'使用jQuery animate时无法看到动画
- 如何使用jquery animate来回移动多个元素
- jQuery animate()函数没有't设置动画
- JQuery.animate();不以固定高度工作
- 有没有一种方法可以用步骤递归调用jQuery animate()
- jquery animate无法正常工作
- JQuery.animate()菜单幻灯片返回
- jQuery animate只在单击时工作一次
- 如何在不使用css转换的情况下将jQuery animate与css3属性相结合
- Implementation of jQuery 'animate' with Meteor
- jQuery Animate 在创建图库滑块时不起作用
- jQuery animate 会中断空格键滚动
- Jquery Animate on IE makes error
- 使用 jQuery animate 时绘制一个又一个对象的线条
- Jquery animate 不能与 IE 一起使用 - 什么也没发生
- 只执行一次jquery animate
- 第一个jQuery.animate()不工作
- 使用jquery animate()在文本上实现反弹效果
- jquery .animate 回调自动执行
- jQuery+Animate.css动画只工作一次,动画不会重置