摘要: var node=$('#id');第一种写法if(node.is(':hidden')){ //如果node是隐藏的则显示node元素,否则隐藏 node.show(); }else{ node.hide();}第二种写法if(!node.is(':visible')){ //如果node... 阅读全文
posted @ 2014-06-11 15:46 mabel_on_line 阅读(73237) 评论(0) 推荐(2) 编辑
摘要: var node = $('#id');node.click(function(){ this.css('display','block'); //报错 this是一个html元素,不是jquery对象,因此this不能调用jquery的css()方法 $(this).css(); ... 阅读全文
posted @ 2014-06-11 15:26 mabel_on_line 阅读(1652) 评论(0) 推荐(0) 编辑
摘要: 本文就是自己看,如果您不小心进到了这里,请看源处,是这个作者翻译的:http://blog.sae.sina.com.cn/archives/4157讨论jQuery和javascript性能的文章并不罕见。然而,本文我计划总结一些速度方面的技巧和我本人的一些建议,来提升你的jQuery和javas... 阅读全文
posted @ 2014-06-11 11:04 mabel_on_line 阅读(233) 评论(0) 推荐(0) 编辑