jquery中交替点击事件toggle方法的使用示例_jquery

WBOY
Release: 2016-05-16 17:10:24
Original
952 people have browsed it
复制代码代码如下:

$('#clickId‘).toggle(

function(){$('#divId').hide();},

function(){$('#divId').show();}

);

toggle方法中有两个参数,分别是要交替执行的事件。如果不传参默认是显示隐藏功能
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!