Home > Web Front-end > JS Tutorial > JQuery入门——事件切换之toggle()方法应用介绍_jquery

JQuery入门——事件切换之toggle()方法应用介绍_jquery

WBOY
Release: 2016-05-16 17:41:58
Original
1124 people have browsed it

1、在toggle()方法中,可以依次调用N个指定的函数,直到最后一个函数,然后重复对这个函数轮番调用,其语法如下:toggle(fn, fn2, [fn3, fn4,...]),其中fn、fn2、fn3、fn4等函数依次调用。

2、示例代码

复制代码 代码如下:





toggle方法






JQuery入门——事件切换之toggle()方法应用介绍_jquery



3、效果图预览

第一次点击:


第二次点击:


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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template