$(document).ready(fuction(){
$('div').html('hehe');
});
2017/7/19
$('div').html('hehe');
});
2017/7/19
2017-07-19
把图片里的$(":parent")描述改成"选择所有含有子元素且子元素含有文本的元素"。
2017-07-18
.toggleClass( function(index, class, switch) [, switch ] ):用来返回在匹配的元素集合中的每个元素上用来切换的样式类名的一个函数。接收元素的索引位置和元素旧的样式类作为参数 !尽管我想把理解不了的这个锅甩给我遍历的语文老师 好难诶。
2017-07-18
toggle() 方法在 jQuery 版本 1.8 中被废弃,在版本 1.9 中被移除。。。
2017-07-18
dom中有个概念的区分:Attribute和Property翻译出来都是“属性”,《js高级程序设计》书中翻译为“特性”和“属性”。简单理解,Attribute就是dom节点自带的属性
例如:html中常用的id、class、title、align等:
例如:html中常用的id、class、title、align等:
2017-07-17
$('#menu_con .tag p:first-child').css('color','#9932CC');
$('#menu_con .tag a:lt(4)').css('color','red');
$("#menu_con .tag a[name=setColor]").css('color','blue');
$(".tag dd a:nth-child(10)").css('color','#66CD00');
$('#menu_female .tag a:last-child').css('color','#C71585');
$('#menu_con .tag a:lt(4)').css('color','red');
$("#menu_con .tag a[name=setColor]").css('color','blue');
$(".tag dd a:nth-child(10)").css('color','#66CD00');
$('#menu_female .tag a:last-child').css('color','#C71585');
this,表示当前的上下文对象是一个html对象,可以调用html对象所拥有的属性和方法。
$(this),代表的上下文对象是一个jquery的上下文对象,可以调用jQuery的方法和属性值。
$(this),代表的上下文对象是一个jquery的上下文对象,可以调用jQuery的方法和属性值。
2017-07-17