Blogger Information
Blog 56
fans 7
comment 11
visits 222555
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
【JQuery】$("span", this)是什么意思?
樂成的开发笔记
Original
1475 people have browsed it

1、新朋友可能不知道$("span", this)是什么意思,简单看一下

<!-- html -->
<ul>
	<li>这是li<span>A</span><b>X</b></li>
	<li>这是li<span>A</span><b>X</b></li>
	<li>这是li<span>A</span><b>X</b></li>
	<li>这是li<span>A</span><b>X</b></li>
</ul>
//js
$("span", this)
$(this).find('span')

2、有时候li绑定了点击事件,想操作当前li的span就可以用这种的选择方式,比如点击li,想把li里边的A变出B,用上边的选择器就简单多

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post