`

jquery-one()

 
阅读更多
one() 为被选元素附加一个或多个事件处理程序,并规定当事件发生时运行的函数。即每个元素只能运行一次事件处理器函数。

语法:$(selector).one(event,data,function)

<script type="text/javascript">
$(document).ready(function(){
  $("p").one("click",function(){
    $(this).animate({fontSize:"+=6px"});
  });
});
</script>
</head>
<body>
<p>这是一个段落。</p>
<p>请点击 p 元素增加其内容的文本大小。每个 p 元素只会触发一次改事件。</p>




  • 大小: 20.8 KB
  • 大小: 29.2 KB
分享到:
评论

相关推荐

    jQuery导航插件One-Page-Nav.zip

    电商网站的分类比较明确,比如1楼是手机通讯产品,2楼是家用电器,3楼是服装鞋包...如果你想在自己的页面上也实现这样的效果,那么可以试试 jQuery-One-Page-Nav 这款 jQuery插件。查看演示 标签:OnePageNav

    前端项目-jquery-datetimepicker.zip

    前端项目-jquery-datetimepicker,jQuery Plugin DateTimePicker it is DatePicker and TimePicker in one

    jquery-one-click-outside:当有人在外面点击时被呼叫

    #jQuery 在外面一键点击 jQuery.oneClickOutside 是一个轻量级的 jQuery 插件 (1kb),可让您为元素外部的点击添加一次性回调。 之后,所有事件侦听器都会自动删除并销毁插件实例。 单击查看演示。 下载(缩小)或...

    jquery-mytooltip插件鼠标悬停文字提示代码.zip

    link rel="stylesheet" href="jquery.mytooltip.css?3.1.64"&gt;  &lt;link rel="stylesheet" href="demo/style.css?3.1.64"&gt;  [removed][removed]  [removed][removed]  [removed][removed] &lt;/head&...

    Migration jquery-support-msie 无法获取属性“msie”的值:

    无法获取属性“msie”的值,高版本的jquery已经不支持$.browser,所以在使用高版本的jquery.js时,会报msie没定义或者为Null的情况,这个插件正好解决了这个问题,query社区提供的对jquery1.9以下废弃的API进行另外...

    jQuery-1.9.1(英文版)帮助文档

    实用性很强 喜欢的朋友可以自由下载 同时欢迎更多朋友参与资源共享 All For One One For All "&gt;jQuery 1 9 1英文版帮助文档 包括3个部分内容:学习中心(Learning Center) JQuery API JQuery UI API 其中学习中心有...

    jquery-1.1.3 效率提高800%

    function (XMLHttpRequest, textStatus, errorThrown) { // typically only one of textStatus or errorThrown // will have info this; // the options for this ajax request }global(true) 数据...

    phpQuery-onefile

    php操作html dom可以像jquery那样方便的操作. eg: 提取html文件中id为left class为 box 的所有节点并输出. include('./phpQuery-onefile.php'); $html = phpQuery::newDocumentFileHTML('./file.html')-&gt;find('#left...

    jquery-ui.theme.css

    实现js动态加载的重要js核心... jsloader.js scnu_lts2012-11-15上传 one page one application利器, 实现js动态加载...

    jquery-easyui-1.3.4

    tree: When append or insert nodes, the 'data' parameter accepts one or more nodes data. tree: The 'getChecked' method accepts a single 'state' or an array of 'state'. tree: Add 'scrollTo' method. ...

    jQuery-点击滑动显示分享按钮代码.zip

    &lt;i id="sub_btn_one" class="fa fa-qq" aria-hidden="true" font-size: 22px;"&gt; &lt;i id="sub_btn_two" class="fa fa-facebook-official" aria-hidden="true" font-size: 22px;"&gt; ...

    jquery-transitionend:只是过渡过渡CSS动画事件的一个猴子补丁

    jQuery-CSS动画的transitionend Monkeypatch jQuery.fn.on函数,因此我们可以使用 $ ( '.my-element' ) . one ( 'transitionend' , function ( ) { console . log ( 'Finished animation' ) ; } ) ; 代替 $ ( '....

    jquery onepage-scroll单页面应用-微信全屏滚...

    jquery onepage-scroll单页面应用-微信全屏滚... jquery onepage-scroll单页面应用-微信全屏滚...

    Pro.jQuery.2.0

    One of the first books to cover jQuery Mobile to create touch-enabled interfaces for mobile devices and tablets. Provides readers with complete A-Z coverage of jQuery, from its fundamentals to the ...

    [jQuery.UI.1.7.jQuery用户界面库].文字版.pdf

    jQuery has quickly become one of the most popular JavaScript libraries in use today and jQuery UI will definitely become the extension library of choice, thanks to its ever-growing range of common UI ...

    JQuery-tableDnD 拖拽的基本使用介绍

    在页面上导入js 代码如下:jquery-1.3.2.min.jsjquery.tablednd_0_5.js注意:一定要先导入jquery-1.3.2.min.js 否则出错。·建table 代码如下:”table-1″ cellspacing=”0″ cellpadding=”2″&gt; ”1″&gt;&lt;td&gt;1&lt;/td&gt;...

    ProjetoDIO-CloneNetflix:数字创新One.Foi desenvolvido html-jQuery-Javascript

    ProjetoDIO-CloneNetflix:数字创新One.Foi desenvolvido html-jQuery-Javascript

    jquery-deferred-images:加载所选图像后执行回调

    jQuery 延迟图像 加载所选图像后执行回调。 (请注意,这可能不适用于跨浏览器,请... log ( 'at least one image failed' ) ; }} ) ;选项完毕类型: function 默认值:noop 成功加载所有图像后调用的函数失败类型:

    jquery插件---slideViewer

    http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html slideViewer (a jQuery ... This may be useful to instantly create a gallery within one or more posts in a blog.

    jQuery-mobile事件监听与用法详解

    本文实例讲述了jQuery-mobile事件监听与用法。分享给大家供大家参考,具体如下: 触摸事件 – 当用户触摸屏幕时触发(敲击和滑动) 滚动事件 – 当上下滚动时触发 方向事件 – 当设备垂直或水平旋转时触发 页面事件 ...

Global site tag (gtag.js) - Google Analytics