博客
关于我
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/

你可能感兴趣的文章
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'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>
No qualifying bean of type XXX found for dependency XXX.
查看>>
No qualifying bean of type ‘com.netflix.discovery.AbstractDiscoveryClientOptionalArgs<?>‘ available
查看>>
No resource identifier found for attribute 'srcCompat' in package的解决办法
查看>>
no session found for current thread
查看>>
No static resource favicon.ico.
查看>>
no such file or directory AndroidManifest.xml
查看>>