JS-jQuery:百科
| ylbtech-JS-jQuery:百科 |
| 1.返回顶部 |
- 中文名:极快瑞
- 外文名:jQuery
- 核心理念:write less,do more
- 发布时间:2006年1月
- 发布人:John Resig
- 发布地点:美国纽约
- 最新版本:jQuery 3.4.1
- 第一个版本:jQuery 1.0(2006年1月)
- 内部引入库:Sizzle.js
| 2.返回顶部 |
发展历程
|
1
2
3
4
5
6
7
|
Behaviour.register({ '#example li': function(e){ e.onclick = function(){ this.parentNode.removeChild(this); } }}); |
|
1
2
3
4
5
|
$('#example li').bind('click',function(){ this.parentNode.removeChild(this);}); 第二个例子是为不同的元素注册不同的事件: |
|
1
2
3
4
5
6
7
8
9
10
11
12
|
Behaviour.register({ 'b.someclass' : function(e){ e.onclick = function(){ alert(this.innerHTML); } }, '#someid u' : function(e){ e.onmouseover = function(){ this.innerHTML = "BLAH!"; } }}); |
|
1
2
3
4
5
6
|
$('b.someclass').bind('click',function(){ alert(this.innerHTML);});$('#someid u').bind('mouseover',function(){ this.innerHTML = 'BLAH!';}); |
|
1
2
3
4
5
6
7
8
9
10
11
12
|
Behaviour.register({ '#foo ol li': function(a) { a.title = "List Items!"; a.onclick = function(){ alert('Hello!'); }; }, '#foo ol li.tmp': function(a) { a.style.color = 'white'; }, '#foo ol li.tmp .foo': function(a) { a.style.background = 'red';}}); |
|
1
2
3
4
5
6
7
|
$('#foo ol li') .set('title','List Items!') .bind('click',function(){ alert('Hello!'); }) .select('.tmp') .style('color','white') .select('.foo') .style('background','red'); |
|
1
2
3
4
5
6
7
8
9
10
|
//1.4.2$("table").delegate("td", "hover", function(){ $(this).toggleClass("hover");});//1.3.2$("table").each(function(){ $("td", this).live("hover", function(){ $(this).toggleClass("hover"); });}); |
编程开发
语言特点
工作原理
语言基础
选择器
|
1
|
$("p") |
|
1
|
$("#test") |
|
1
|
$(".test") |
事件处理
|
1
|
$("p").click(); |
|
1
2
3
|
$("p").click(function(){ // 动作触发后执行的代码!!}); |
|
1
2
3
|
$("p").click(function(){ $(this).hide();}); |
|
1
2
3
|
$("p").dblclick(function(){ $(this).hide();}); |
|
1
2
3
|
$("#p1").mouseenter(function(){ alert("You entered p1!");}); |
|
1
2
3
|
$("#p1").mouseleave(function(){ alert("Bye! You now leave p1!");}); |
|
1
2
3
|
$("#p1").mousedown(function(){ alert("Mouse down over p1!");}); |
|
1
2
3
|
$("#p1").mouseup(function(){ alert("Mouse up over p1!");}); |
|
1
2
3
4
5
6
|
$("#p1").hover(function(){ alert("You entered p1!"); }, function(){ alert("Bye! You now leave p1!");}); |
|
1
2
3
|
$("input").focus(function(){ $(this).css("background-color","#cccccc");}); |
|
1
2
3
|
$("input").blur(function(){ $(this).css("background-color","#ffffff");}); |
技术应用
学习指南
语言评价
| 3.返回顶部 |
| 4.返回顶部 |
| 5.返回顶部 |
| 6.返回顶部 |
![]() |
作者:ylbtech 出处:http://ylbtech.cnblogs.com/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 |
JS-jQuery:百科的更多相关文章
- js,jquery,css,html5特效
包含js,jquery,css,html5特效,源代码 本文地址:http://www.cnblogs.com/roucheng/p/texiao.html 2017新年快乐特效 jQuery最新最全 ...
- Js/Jquery获取iframe中的元素
转载: Js/Jquery获取iframe中的元素 - - ITeye技术网站http://java-my-life.iteye.com/blog/1275205 在web开发中,经常会用到ifram ...
- js/jquery/html前端开发常用到代码片段
1.IE条件注释 条件注释简介 IE中的条件注释(Conditional comments)对IE的版本和IE非IE有优秀的区分能力,是WEB设计中常用的hack方法.条件注释只能用于IE5以上,IE ...
- js jquery 页面加载初始化方法
js jquery 页面加载初始化方法 一.js页面加载初始化方法 // 1.在body里面写初始化方法. <body onload='init()'> </body> < ...
- js jquery 选择器总结
js jquery 选择器总结 一.原始JS选择器. id选择器:document.getElementById("test"); name选择器:document.getElem ...
- [JS]jQuery,javascript获得网页的高度和宽度
[JS]jQuery,javascript获得网页的高度和宽度网页可见区域宽: document.body.clientWidth 网页可见区域高: document.body.clientHeigh ...
- spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js...
问题:spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js... web.x ...
- js jquery中 的数据类型
任何一门语言, buguan 是动态的, 还是像C语言的, 都有严格的 类型 "概念的", 这个是由于 编译器和解释器要求的, 需要的. 所以在是使用像 js, jquey ,ph ...
- paip.提升效率--数据绑定到table原理和流程Angular js jquery实现
paip.提升效率--数据绑定到table原理和流程Angular js jquery实现 html #--keyword 1 #---原理和流程 1 #----jq实现的代码 1 #-----An ...
- JS Jquery去除数组重复元素
js jquery去除数组中的重复元素 第一种:$.unique() 第二种: for(var i = 0,len = totalArray_line.length;i < len;i++) { ...
随机推荐
- node js 操作redis promise
连接 redis = require('redis') var client = redis.createClient('6379', '127.0.0.1'); client.on('connect ...
- Cygwin访问windows磁盘目录
http://blog.csdn.net/duguduchong/article/details/7680650 Cygwin访问windows磁盘目录 标签: windows磁盘user平台c 2 ...
- 《单词的减法》state1~state17(第三遍学习记录)
2016.05.24 state 8 curse/curve dedication 多用于奉献和献身 disastrous disruptive distract state 9 domestic/d ...
- Codeforces 1114C(数论)
题面 传送门 分析 我们先考虑n!在10进制下有多少个0 由于10=2*5, 我们考虑n!的分解式中5的指数,答案显然等于\(\frac{n}{5}+\frac{n}{5^2}+\frac{n}{5^ ...
- object in depth
创建和修改属性 创建对象 const myObject = {}; //字面量表示法 const myObject = new Object(); //Object() 构造函数 修改属性 ---- ...
- (转)收集 Spring Boot 相关的学习资料,Spring Cloud点这里 重点推荐:Spring Boot 中文索引
推荐博客 纯洁的微笑-Spring Boot系列文章 林祥纤-从零开始学Spring Boot Mkyong-Spring Boot教程(国外) baeldung-Spring Boot教程(国外) ...
- LeetCode Linked List Easy 21. Merge Two Sorted Lists
Description Merge two sorted linked lists and return it as a new list. The new list should be made b ...
- WPF的Effect效果
一.阴影效果(DropShadowEffect) <TextBlock Text="> <TextBlock.Effect> <DropShadowEffect ...
- mysql基于Altas读写分离并实现高可用
实验环境准备: master:192.168.200.111 slave1:192.168.200.112 slave2:192.168.200.113 Altas:192.168.200.114 c ...
- go语言从例子开始之Example12.func函数
函数 是 Go 的中心.我们将通过一些不同的例子来进行学习. Example: package main import "fmt" //定义一个函数使用关键字func //函数名名 ...
