码迷,mamicode.com
首页 > Web开发 > 详细

jquery 的主要知识

时间:2017-10-24 22:34:40      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:文档   css   bsp   rem   处理   pre   first   before   签名   

获取jquery对象:
$("选择器") jQuery("选择器");
jquery对象>>dom对象
方式1:
jquery对象.get(index);

方式2:
jquery对象[index]
dom对象>>jquery对象
$(dom对象)

页面载入
$(function(){})

派发事件
jquery对象.事件(function(){...});

选择器:
#id值 .class值 标签名 [属性] [属性=‘值‘]
a b:后代 a>b:孩子 a+b:大弟弟 a~b:所有弟弟
:first :last :odd :even :eq|gt|lt(index)
:hidden
:checked :selected
属性和css:
prop|attr
css

文本 标签体
val()
html() text()

文档处理
内部插入
append prepend
外部插入
after before
删除
remove
效果:
隐藏|显示
show() hide()
淡入淡出
fadeIn() fadeOut()
滑入滑出
slideDown() slideUp()

遍历
jquery对象.each(function(){
});

 

jquery 的主要知识

标签:文档   css   bsp   rem   处理   pre   first   before   签名   

原文地址:http://www.cnblogs.com/nextgg/p/7725810.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!