3. jQuery事件的链式写法

版权声明:本文为大都督作者的原创文章,未经 大都督 允许也可以转载,但请注明出处,谢谢! 共勉! https://blog.csdn.net/qq_37335220/article/details/84592857
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jQuery事件的链式写法</title>
	<link href="../define.css" rel="stylesheet">
</head>
<body>

<div class="iframe">
	<div class="defcol">
		标题
	</div>
</div>


<script src="../jquery.min.js"></script>
<script type="text/javascript">
	$(function() {
		$(".defcol").click(function(){
			$(this).toggleClass("curcol");
		})
	})
</script>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/qq_37335220/article/details/84592857
3.