开发者

Jquery ajaxStop does not work on IE

When i use ajax to load a page, i am trying to use a flash or text to show a page is loading. The code below works fine on Firefox and Chrome, not with IE. I dont know the problem. It seems the class dont stop at all.

This is my Jquery script

$(document).ready(function(){
 $.ajaxSetup({cache: false});
 $demo='tse';
 $('#loading').ajaxStart(function(){
  $(this).show();
 }).ajaxStop(function(){

  $(this).hide();
 });

 $('#ui_demo_1').click(function(){
  $.get('ajax_feed.php',{
   demo:$demo
   },function(data){
    $('#ui_demo').html(data).fadeIn(700).css('font-weight','italic');

    return false;
   });
  return false;
 });
});

Here is my html code:

<a href="#" id="ui_demo_1">Click here</a>
<span id="loading">
  Loading ...
</span>
<div id="ui_demo">

</div>

any help is appriciated 开发者_运维问答...


It is likely that the success function of your ajax call is failing with some error. I had a similar case. IE does not tell you anything, just the ajaxStop is not triggered.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜