摘要: 1.each()$(selector).each(function(index,element))var arr = [ "a", "bb", "ccc" ]; $.each(arr,function(i,a){ console.log(i+":"+a); })... 阅读全文
posted @ 2015-08-27 20:02 fj0716 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 一、选择合适的选择器1.$("#id")是最佳的性能方式,直接调用document.getElementById()。2.其次使用$("element")标签选择器。3.再其次选择$(".class")类选择器。4.$("[attribute=value]")属性选择和$(":hidden")伪类选... 阅读全文
posted @ 2015-08-27 10:11 fj0716 阅读(97) 评论(0) 推荐(0) 编辑