博客
关于我
JQuery_动画与遍历_hehe.employment.over.21.1
阅读量:388 次
发布时间:2019-03-05

本文共 1056 字,大约阅读时间需要 3 分钟。

文章目录

21.1 JQuery_动画

21.1.1 默认显示和隐藏方式

  • show([speed,[easing],[fn]])
    • 参数:
      • speed动画的速度。三个预定义的值==(“slow”,“normal”, “fast”)表示动画时长的毫秒数值==(如:1000)。
      • easing:用来指定切换效果,默认是"swing",可用参数"linear"。
        • swing:动画执行时效果是 先慢,中间快,最后又慢
        • linear:动画执行时速度是匀速的。
      • fn:在动画完成时执行的函数,每个元素执行一次。
  • hide([speed,[easing],[fn]])
  • toggle([speed],[easing],[fn])

21.1.2 滑动显示和隐藏方式

  • slideDown([speed],[easing],[fn])
  • slideUp([speed,[easing],[fn]])
  • slideToggle([speed],[easing],[fn])

21.1.3 淡入淡出显示和隐藏方式

  • fadeIn([speed],[easing],[fn])
  • fadeOut([speed],[easing],[fn])
  • fadeToggle([speed,[easing],[fn]])

21.1.4 示例

    
Insert title here
div显示和隐藏

21.2 JQuery_遍历

21.2.1 js遍历

  • for(初始化值;循环结束条件;步长)

21.2.2 jquery遍历

  • 1.jq对象.each(callback)
    • 语法jquery对象.each(function(index,element){});
      • index:就是元素在集合中的索引
      • element:就是集合中的每一个元素对象
      • this:集合中的每一个元素对象
    • 回调函数返回值: *
      • true:如果当前function返回为false,则结束循环(break)。
      • false:如果当前function返回为true,则结束本次循环,继续下次循环(continue)。
  • 2.$.each(object, [callback])
  • 3.for..of : jquery 3.0 版本之后提供的方式
    • for(元素对象 of 容器对象)

21.2.3 示例

    
  • 北京
  • 上海
  • 天津
  • 重庆

转载地址:http://lugwz.baihongyu.com/

你可能感兴趣的文章
Nmap渗透测试指南之指纹识别与探测、伺机而动
查看>>
Nmap端口扫描工具Windows安装和命令大全(非常详细)零基础入门到精通,收藏这篇就够了
查看>>
NMAP网络扫描工具的安装与使用
查看>>
NMF(非负矩阵分解)
查看>>
nmon_x86_64_centos7工具如何使用
查看>>
NN&DL4.1 Deep L-layer neural network简介
查看>>
NN&DL4.3 Getting your matrix dimensions right
查看>>
NN&DL4.7 Parameters vs Hyperparameters
查看>>
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>