jQuery 效果 show() 方法

jQuery 教程 · 2019-03-27 09:29:50

实例

显示所有隐藏的 <p> 元素:

$("button").click(function(){ $("p").show(); });

定义和用法

show() 方法显示隐藏的被选元素。

注意:show() 适用于通过 jQuery 方法和 CSS 中 display:none 隐藏的元素(不适用于通过 visibility:hidden 隐藏的元素)。

提示:如需隐藏元素,请查看 hide() 方法。

语法

$(selector).show(speed,easing,callback)

参数 描述
speed 可选。规定显示效果的速度。

可能的值:

  • 毫秒
  • "slow"
  • "fast"
easing 可选。规定在动画的不同点上元素的速度。默认值为 "swing"。

可能的值:

  • "swing" - 在开头/结尾移动慢,在中间移动快
  • "linear" - 匀速移动
提示:扩展插件中提供更多可用的 easing 函数。
callback 可选。show() 方法执行完之后,要执行的函数。

如需学习更多有关 callback 的内容,请访问我们的 jQuery Callback 这一章。


点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html

查看所有标签

A Guide to Monte Carlo Simulations in Statistical Physics

A Guide to Monte Carlo Simulations in Statistical Physics

Landau, David P./ Binder, Kurt / Cambridge Univ Pr / 2005-9 / 786.00元

This new and updated edition deals with all aspects of Monte Carlo simulation of complex physical systems encountered in condensed-matter physics, statistical mechanics, and related fields. After brie......一起来看看 《A Guide to Monte Carlo Simulations in Statistical Physics》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

html转js在线工具
html转js在线工具

html转js在线工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换