jquery中one()方法的用法实例
2018-10-12 14:06
573 查看
本文实例讲述了jquery中one()方法的用法。分享给大家供大家参考。具体分析如下:
jQuery中的one()方法:表示只执行一次,代码如下:
<html>
<head>
<title>jquery事件:one()方法的使用</title>
<script type="text/javascript" src="jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("p, h1, h2").one("click",function(){
$(this).animate({fontSize:"+=3px"});
});
});
</script>
</head>
<body>
<h1>这是一个标题</h1>
<h2>这是另一个标题</h2>
<p>这是一个段落</p>
</body>
</html>
希望本文所述对大家的jQuery程序设计有所帮助。
您可能感兴趣的文章:
相关文章推荐
- jQuery的one()方法用法实例
- jQuery的one()方法用法实例
- jquery中one()方法的用法实例
- jQuery中addClass()方法用法实例
- jQuery中index()方法用法实例
- jQuery中offset()方法用法实例
- jQuery中get()方法用法实例
- jQuery中has()方法用法实例
- jQuery中scrollTop()方法用法实例
- jQuery中not()方法用法实例
- jQuery中next()方法用法实例
- jQuery中removeProp()方法用法实例
- jQuery中prependTo()方法用法实例
- jQuery中val()方法用法实例
- jQuery中ajax的load()方法用法实例
- jQuery中innerWidth()方法用法实例
- jQuery中get()方法用法实例
- jquery中的each用法以及js中的each方法实现实例
- jQuery中position()方法用法实例