
JQuery
灯光下的投影
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
JQuery的入口函数以及对象
什么是JQuery:js库其实就是一个js文件,里面封装了大量的方法,它是快速的轻量的功能丰富的 一个javascript库。 一、入口函数: 入口函数的好处: 1. 保证元素正确加载 2. 形成一个沙箱,防止全局变量污染 写法一: $(document).ready(function() { // 当文档加载好了,就执行 console.log('嘿嘿'); }); 写...原创 2019-05-03 14:22:56 · 259 阅读 · 0 评论 -
JQuery的选择器以及属性操作
jQuery选择器: <body> <div id="box">1111</div> <div>222</div> <div class="demo"> <p>111</p> <p>222</p> </div> <p>...原创 2019-05-03 14:40:11 · 304 阅读 · 0 评论 -
JQuery的基本动画和自定义动画
基本动画: 1、show-hide-toggle <style> div { width: 400px; height: 400px; background-color: pink; display: none; } </style> </head> <body> <...原创 2019-05-03 14:56:21 · 276 阅读 · 0 评论 -
JQuery的元素以及节点
一、jquery创建元素: var $btn = $('<button>这是个按钮</button>'); console.log($btn); 二、添加节点: <style> div { width: 400px; height: 400px; background-color: pink; }...原创 2019-05-03 15:13:52 · 251 阅读 · 0 评论 -
自定义jquery插件
一、自定义backgrondColor插件: jquery.bgc.js文件: // jQuery.proptotype // jQuery.fn // $.prototype // $.fn $.fn.bgc = function(color) { // 修改jquery对象的背景颜色即可 this.css('backgroundColor', color) } 调用jquery...原创 2019-05-11 18:57:11 · 177 阅读 · 0 评论