.slideUp()

.slideUp( [duration ] [, complete ] )Returns: jQuery

Description: Hide the matched elements with a sliding motion.

  • version added: 1.0.slideUp( [duration ] [, complete ] )

    • duration (default: 400)
      Type: Number or String
      A string or number determining how long the animation will run.
    • complete
      Type: Function()
      A function to call once the animation is complete, called once per matched element.
  • version added: 1.0.slideUp( options )

    • options
      A map of additional options to pass to the method.
      • duration (default: 400)
        Type: Number or String
        A string or number determining how long the animation will run.
      • easing (default: swing)
        Type: String
        A string indicating which easing function to use for the transition.
      • queue (default: true)
        Type: Boolean or String
        A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it.
      • specialEasing
        An object containing one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4)
      • step
        Type: Function( Number now, Tween tween )
        A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set.
      • progress
        Type: Function( Promise animation, Number progress, Number remainingMs )
        A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8)
      • complete
        Type: Function()
        A function that is called once the animation on an element is complete.
      • start
        Type: Function( Promise animation )
        A function to call when the animation on an element begins. (version added: 1.8)
      • done
        Type: Function( Promise animation, Boolean jumpedToEnd )
        A function to be called when the animation on an element completes (its Promise object is resolved). (version added: 1.8)
      • fail
        Type: Function( Promise animation, Boolean jumpedToEnd )
        A function to be called when the animation on an element fails to complete (its Promise object is rejected). (version added: 1.8)
      • always
        Type: Function( Promise animation, Boolean jumpedToEnd )
        A function to be called when the animation on an element completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8)
  • version added: 1.4.3.slideUp( [duration ] [, easing ] [, complete ] )

    • duration (default: 400)
      Type: Number or String
      A string or number determining how long the animation will run.
    • easing (default: swing)
      Type: String
      A string indicating which easing function to use for the transition.
    • complete
      Type: Function()
      A function to call once the animation is complete, called once per matched element.

The .slideUp() method animates the height of the matched elements. This causes lower parts of the page to slide up, appearing to conceal the items. Once the height reaches 0 (or, if set, to whatever the CSS min-height property is), the display style property is set to none to ensure that the element no longer affects the layout of the page.

Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectively. If any other string is supplied, or if the duration parameter is omitted, the default duration of 400 milliseconds is used.

.slideUp()的更多相关文章

  1. jQuery动画slideUp()不正常位移原因

    用jQuery写一个列表.当点击底部按钮时,列表中序号超过6的项目可以向下拉出或者向上收起. 用slideUp(),遇见一个问题.展开列表项会产生不正常位移,如下图所示.动画结束发生位移. 出现这个问 ...

  2. 今天是JQ 的slideUp 和 slideDown 的点击事件

    先贴代码,再讲详细事件 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> & ...

  3. jq slideUp slideDown

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  4. 工作日志 jquery slideDown slideUp

    jquery里面使用 slideDown 和  slideUp会有一个像素的偏差

  5. jquery 连写注释;siblings() 方法;jQuery 的3种滑动方法;slideUp()向上滑动;slideDown()向下滑动;slideToggle()来回滑动

    首先我们看两个连写注释 第一个:   /* 点击头像,显示基本资料 */ $(".f-chatTit a.avatar").click(function(){ $(this).hi ...

  6. js冒泡事件的特例toggle无法实现阻止冒泡——slideDown()和slideUp()

    一.问题 题目及答案展示:要求,点击题目,展开答案.如下: 展开前 展开后 最开始使用的toggle方法来实现 $(".content_problem").toggle( func ...

  7. jquery slideDown slideUp 对于table无效

    jquery slideDown slideUp 对于table无效,需要在table外面套一层div才可以使用

  8. 关于slideup和slidedown 鼠标多次滑过累积的动画效果

    stop() 方法停止当前正在运行的动画 包括animation动画和slideup/slidedown动画 例如:鼠标经过一个元素时,执行一个slide动画,多次快速经过,不处理的话这个元素会保留累 ...

  9. jquery的slideUp、slideDown、slideToggle等涉及滑动效果的一系列函数,在IE浏览器下有几处bug

    jquery的slideUp.slideDown.slideToggle等涉及滑动效果的一系列函数,在IE浏览器下有几处bug: 1. 因position引起的问题 影响:IE全系列 症状:在需要sl ...

  10. slideToggle+slideup实现手机端折叠菜单效果

    折叠菜单的效果,网上有很多的插件,比如bootstrap的 Collapse ,很好用也很简单,但是如果你使用的不是bootstrap框架,就会造成很多不必要的麻烦,比如默认样式被修改,代码冗余等等, ...

随机推荐

  1. CSS-百分百布局

    1.照片随着大小变化: 这里面重点就是每个包裹盒子是25%,图片是100%显示: <div class="box2"> <p> //这里都是4个: < ...

  2. Eclipse中插件的运用

    1. hotcode2.jar 支持java代码热部署,改了本地java代码不需要重新部署生效,可以节省开发时间,提高开发效率. 安装方法: 到help -- install new software ...

  3. Idea java 程序打jar包(maven)

    1.准备好控制台程序 2.引用的项目打包(公共类接口) 3.开发打包 点击运行 打包结果如下

  4. JS常用函数原理的实现

    本文针对目前常见的面试题,实现了相应方法的核心原理,部分边界细节未处理.后续也会持续更新,希望对你有所帮助. 1.实现一个call函数 // 思路:将要改变this指向的方法挂到目标this上执行并返 ...

  5. tornada-模板

    tornado模板 1.配置模板路径 (project/config.py) # coding=utf-8 import os BASE_DIRS = os.path.dirname(__file__ ...

  6. jmeter通过if控制器控制业务比例

    以发帖,看帖,回帖三个事物为例,这里就10个用户跑10次,进行测试下: 可以看到看帖,回帖,发帖比例是5:3:2,先来说说怎么做到的,就是通过if控制器,分别来看下几个控制器的内容, 看帖(if控制器 ...

  7. ffmpeg函数04__v_register_output_format()

    注册复用器,编码器等的函数av_register_all() 注册编解码器avcodec_register_all() 注册复用器的函数是av_register_output_format(). 注册 ...

  8. 什么是Redis缓存穿透、缓存雪崩和缓存击穿

    https://baijiahao.baidu.com/s?id=1619572269435584821&wfr=spider&for=pc 缓存穿透 缓存穿透,是指查询一个数据库一定 ...

  9. UVA - 11107 Life Forms (广义后缀自动机+后缀树/后缀数组+尺取)

    题意:给你n个字符串,求出在超过一半的字符串中出现的所有子串中最长的子串,按字典序输出. 这道题算是我的一个黑历史了吧,以前我的做法是对这n个字符串建广义后缀自动机,然后在自动机上dfs,交上去AC了 ...

  10. git最最最最...常用命令

    使用git 也有一段时间了,但是一直没有好好的去学下:今天刚好有空,就把自己不足的地方补了一下:废话就不多说了,直接步入正题: 1:git 如何提交代码 以及 如何拉代码 git clone可以将远程 ...