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

jquery笔记

时间:2017-03-18 13:05:16      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:定义   padding   set   ons   insert   outer   appendto   包括   interval   


// setInterval(function(){
// console.log($(window).scrollTop())//获取滚动距离
// },300)
//
// on("click") 和 click()的区别 : click是单一的事件,而on可以加多个事件及自定义事件,以及对应事件不同的触发不同的事件例:
// $("div").on({
// "click":function(){
// alert(111);
// },
// "mouseover":function(){
// alert(222);
// }
// })
// off(event);取消事件,可以针对个别的事件
//
// $(".top").remove()//删除top
// $(".top").appendTo($(".center"))//将top添加到center里面
// $(".top").append($(".center"))//将center添加到top里面
// $(".top").prependTo($(".center"))//将top添加到center内容的最前面
// $(".top").prepend($(".center"))//将center添加到top内容的最前面
//
// $(".top").insertBefore($(".bottom"));//将top插入到bot前面
// $(".top").before($(".bottom"));//将bot插入top前面
// $(".top").insertAfter($(".bottom"));//将top插入到bot下面
// $(".top").after($(".bottom"));//将bot插入到top下面
//
//width();//内容宽,不包括padding margin border
//innerWidth();//包括内容宽,padding,不包括border和margin
//outerWidth();//包括内容宽,padding,border,默认不包括margin,接收参数是否包括margin
//

jquery笔记

标签:定义   padding   set   ons   insert   outer   appendto   包括   interval   

原文地址:http://www.cnblogs.com/week-1/p/6573000.html

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