jQuery one() 方法
jQuery 教程
· 2019-03-26 20:42:45
实例
当点击 <p> 元素时,增加该元素的文本大小(每个 <p> 元素只能触发一次事件):
$("p").one("click",function(){
$(this).animate({fontSize:"+=6px"});
});
$(this).animate({fontSize:"+=6px"});
});
定义和用法
one() 方法为被选元素添加一个或多个事件处理程序,并规定当事件发生时运行的函数。
当使用 one() 方法时,每个元素只能运行一次事件处理程序函数。
语法
$(selector).one(event,data,function)
| 参数 | 描述 |
|---|---|
| event | 必需。规定添加到元素的一个或多个事件。 由空格分隔多个事件值。必须是有效的事件。 |
| data | 可选。规定传递到函数的额外数据。 |
| function | 必需。规定当事件发生时运行的函数。 |
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
Getting Started with C++ Audio Programming for Game Development
David Gouveia
Written specifically to help C++ developers add audio to their games from scratch, this book gives a clear introduction to the concepts and practical application of audio programming using the FMOD li......一起来看看 《Getting Started with C++ Audio Programming for Game Development》 这本书的介绍吧!