HTML jquery throbber

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了HTML jquery throbber相关的知识,希望对你有一定的参考价值。

<script type='text/javascript'>
             $(document).ready(function(){
                $("#working").bind("ajaxSend", function(){
                  $(this).show();
                }).bind("ajaxComplete", function(){
                  $(this).hide();
                });
             });
            </script>

jqueryajax请求的绑定throbber div

jQuery bindings for showing and hiding a div during AJAX requests. The div will not show unless the AJAX request takes a certain amount of time (in this case 300ms). This will reduce the flicker effect of showing and hiding throbbers.
  1. $('#loading').bind('ajaxStart', function() {
  2. var n = $(this);
  3. n.data('state', 'started');
  4. setTimeout(function() {
  5. if (n.data() && n.data().state == 'started') {
  6. n.slideDown(500);
  7. }
  8. }, 300);
  9. }).bind('ajaxStop', function() {
  10. var n = $(this);
  11. n.data('state', 'stopped');
  12. n.slideUp(500);
  13. });

以上是关于HTML jquery throbber的主要内容,如果未能解决你的问题,请参考以下文章

jqueryajax请求的绑定throbber div

css Drupal 7:隐藏视图ajax progress loader / throbber

[UE4]Circular Throbber,圆形的环形的动态图标

jquery里怎么加入html源代码

html引用jquery文件无效

html怎么导入jquery