Ladda 应用提交表单的时候显示loading载入中 包含不同位置,不同效果

不同大小。位置,效果,进度条等

XML/HTML Code
  1. <article class="examples" style="margin-top:0px;">
  2. <section class="button-demo">
  3. <h3>expand-left</h3>
  4. <button class="ladda-button" data-color="green" data-style="expand-left">Submit</button>
  5. </section>
  6. <section class="button-demo">
  7. <h3>expand-right</h3>
  8. <button class="ladda-button" data-color="green" data-style="expand-right">Submit</button>
  9. </section>
  10. <section class="button-demo">
  11. <h3>expand-up</h3>
  12. <button class="ladda-button" data-color="green" data-style="expand-up">Submit</button>
  13. </section>
  14. <section class="button-demo">
  15. <h3>expand-down</h3>
  16. <button class="ladda-button" data-color="green" data-style="expand-down">Submit</button>
  17. </section>
  18. <section class="button-demo">
  19. <h3>contract</h3>
  20. <button class="ladda-button" data-color="red" data-style="contract">Submit</button>
  21. </section>
  22. <section class="button-demo">
  23. <h3>contract-overlay</h3>
  24. <button class="ladda-button" data-color="red" data-style="contract-overlay" style="z-index: 10;">Submit</button>
  25. </section>
  26. <section class="button-demo">
  27. <h3>zoom-in</h3>
  28. <button class="ladda-button" data-color="red" data-style="zoom-in">Submit</button>
  29. </section>
  30. <section class="button-demo">
  31. <h3>zoom-out</h3>
  32. <button class="ladda-button" data-color="red" data-style="zoom-out">Submit</button>
  33. </section>
  34. <section class="button-demo">
  35. <h3>slide-left</h3>
  36. <button class="ladda-button" data-color="blue" data-style="slide-left">Submit</button>
  37. </section>
  38. <section class="button-demo">
  39. <h3>slide-right</h3>
  40. <button class="ladda-button" data-color="blue" data-style="slide-right">Submit</button>
  41. </section>
  42. <section class="button-demo">
  43. <h3>slide-up</h3>
  44. <button class="ladda-button" data-color="blue" data-style="slide-up">Submit</button>
  45. </section>
  46. <section class="button-demo">
  47. <h3>slide-down</h3>
  48. <button class="ladda-button" data-color="blue" data-style="slide-down">Submit</button>
  49. </section>
  50. <h3 id="progress">Built-in progress bar</h3>
  51. <section class="progress-demo">
  52. <h3>expand-right</h3>
  53. <button class="ladda-button" data-color="purple" data-style="expand-right">Submit</button>
  54. </section>
  55. <section class="progress-demo">
  56. <h3>contract</h3>
  57. <button class="ladda-button" data-color="purple" data-style="contract">Submit</button>
  58. </section>
  59. <h3 id="sizes">Sizes</h3>
  60. <section class="progress-demo">
  61. <h3>Extra Small</h3>
  62. <button class="ladda-button" data-color="mint" data-style="expand-right" data-size="xs">Submit</button>
  63. </section>
  64. <section class="progress-demo">
  65. <h3>Small</h3>
  66. <button class="ladda-button" data-color="mint" data-style="expand-right" data-size="s">Submit</button>
  67. </section>
  68. <section class="progress-demo">
  69. <h3>Large</h3>
  70. <button class="ladda-button" data-color="mint" data-style="expand-right" data-size="l">Submit</button>
  71. </section>
  72. <section class="progress-demo">
  73. <h3>Extra Large</h3>
  74. <button class="ladda-button" data-color="mint" data-style="expand-right" data-size="xl">Submit</button>
  75. </section>
  76. </article>
  77. <script src="dist/spin.min.js"></script>
  78. <script src="dist/ladda.min.js"></script>
  79. <script>
  80. // Bind normal buttons
  81. Ladda.bind( '.button-demo button', { timeout: 2000 } );
  82. // Bind progress buttons and simulate loading progress
  83. Ladda.bind( '.progress-demo button', {
  84. callback: function( instance ) {
  85. var progress = 0;
  86. var interval = setInterval( function() {
  87. progress = Math.min( progress + Math.random() * 0.1, 1 );
  88. instance.setProgress( progress );
  89. if( progress === 1 ) {
  90. instance.stop();
  91. clearInterval( interval );
  92. }
  93. }, 200 );
  94. }
  95. } );
  96. // You can control loading explicitly using the JavaScript API
  97. // as outlined below:
  98. // var l = Ladda.create( document.querySelector( 'button' ) );
  99. // l.start();
  100. // l.stop();
  101. // l.toggle();
  102. // l.isLoading();
  103. // l.setProgress( 0-1 );
  104. </script>

原文地址:http://www.freejs.net/article_biaodan_151.html

Ladda 应用提交表单的时候显示loading载入中 包含不同位置,不同效果的更多相关文章

  1. submit()提交表单时,显示警示框

    我同事在实现submit()提交表单时,想要页面弹出警示框. 但是折腾了几小时后发现,submit()始终不执行. 她的代码如下: $(document).ready(function(){ $(&q ...

  2. 提交表单时的等待(loading)效果

    $(document).ready(function () { $("body").prepend('<div id="overlay" class=&q ...

  3. PHP自学2——将用户提交表单存储到外部普通文件中

    在上一节中我们已经实现了将用户的订单信息提交到服务器端,然后服务器端将提交信息返回并显示到页面上.这一节将把上一节用户的订单信息保存到外部的普通文件中(即.txt文本文件中). 本节代码将用户提交的订 ...

  4. MVC Post 提交表单 允许他提交参数包含html标记的解决方法

    MVC Post 提交表单的时候,如果参数中包含html标记,则需要在控制器上方加上 [ValidateInput(false)]标记后就可以正常提交表单了例如: [HttpPost] [Valida ...

  5. PHP自学3——在html的<table>标签中显示用户提交表单

    为了更好地显示用户提交表单,本节将在上一节的基础上将读取的用户表单显示在html的<table>标签中,这一节将用到和数组有关的知识. 本节代码将从外部文件(.txt文件)中读取信息于指定 ...

  6. jquery 通过submit()方法 提交表单示例

    jquery 通过submit()方法 提交表单示例: 本示例:以用户注册作为例子.使用jquery中的submit()方法实现表单提交. 注:本示例仅提供了对表单的验证,本例只用选用了三个字段作为测 ...

  7. 4 django系列之HTML通过form标签来同时提交表单内容与上传文件

    preface 我们知道提交表单有2种方式,一种直接通过submit页面刷新方法来提交,另一种通过ajax异步局部刷新的方法提交,上回我们说了通过ajax来提交文件到后台,现在说说通过submit来提 ...

  8. Jquery ajax提交表单几种方法

    在jquery中ajax提交表单有post与get方式,在使用get方式时我们可以直接使用ajax 序列化表单$('#表单ID').serialize();就行了,下面我来介绍两个提交表单数据的方法. ...

  9. 解析:使用easyui的form提交表单,在IE下出现类似附件下载时提示是否保存的现象

    之前开发时遇到的一个问题,使用easyui的form提交表单,在Chrome下时没问题的,但是在IE下出现类似附件下载时提示是否保存的现象. 这里记录一下如何解决的.其实这个现象不光是easyui的f ...

随机推荐

  1. Kafka(五)Kafka的API操作和拦截器

    一 kafka的API操作 1.1 环境准备 1)在eclipse中创建一个java工程 2)在工程的根目录创建一个lib文件夹 3)解压kafka安装包,将安装包libs目录下的jar包拷贝到工程的 ...

  2. bash101总结

    看了 bash101 ,做的一些总结吧,都是些常见用法,易错 1. 有空格会显示多行 2.contine 书里太细了,有空补起来

  3. Loadrunner11在win7下录制脚本,ie打不开

    Loadrunner11在win7下录制脚本,ie打不开 使用loadrunner11录制脚本时试了很多办法都无法打开ie浏览器,最后终于解决了 1.ie浏览器去掉启用第三方浏览器扩展 2.loadr ...

  4. mysql 函数group_concat()

    本文通过实例介绍了MySQL中的group_concat函数的使用方法,比如select group_concat(name) .MySQL中group_concat函数完整的语法如下:group_c ...

  5. JAVA特性-跨平台/面向对象

    JAVA特点概述 一,跨平台 这无疑是java最大的特点了,我相信大多数人第一次听说java语言大都从跨平台开开始的.实际上java跨平台特性主要体现在两个方面:编码和运行机制. 1,编码 java语 ...

  6. Java 持久化操作

    持久化就是将内存中的数据保存起来,使之可以长期存在. 在Java中 可以做到持久化有很多种方法. 其中有: 1. 堵塞型IO,也就是我们经常说的io流: 2. 非堵塞型IO,通常称为New IO.也就 ...

  7. Microsoft Office Access

    Microsoft Office Access各版本下载地址:http://www.accessoft.com/download.html 简介 access(微软发布的关联式数据库管理系统)一般指M ...

  8. Xshell6和Xftp下载地址,rzsz的使用

    官方下载地址:https://cdn.netsarang.net/98f59c09/Xshell-6.0.0076r_beta.exe https://cdn.netsarang.net/98f59c ...

  9. [IOI2007]Miners

    [IOI2007]Miners 题目大意: 两个人吃东西,总共有\(3\)种食物,每个人每次吃到食物时可以获得的收益是当前食物和前两次吃的食物中,不同食物的种数.现在给定一个长度为\(n(n\le10 ...

  10. [SimpleOJ229]隧道

    题目大意: 有10个格子,初始状态a和b分别在5和6上. 现在有n个任务,每个任务都有特定的位置. 在每个单位时间,a和b可以分别进行以下事件中的任意一件: 1.向左(右)移动一个格子: 2.锁定在当 ...