Jquery 动画gif显示静止而不是旋转

Jquery 动画gif显示静止而不是旋转,jquery,Jquery,下面的代码片段,我目前正在使用显示动画gif按钮点击事件显示加载gif直到数据从服务器返回,但它只显示一个静态图像,而不是一个动画旋转这里有什么错 在jquery中 $("#btnSearch").jqxButton({ theme: theme, width: '80', height: '25' }); $("#btnSearch").bind('click', function () { if (lookupSearchValidation()) {

下面的代码片段,我目前正在使用显示动画gif按钮点击事件显示加载gif直到数据从服务器返回,但它只显示一个静态图像,而不是一个动画旋转这里有什么错

在jquery中

$("#btnSearch").jqxButton({
    theme: theme,
    width: '80',
    height: '25'
});
$("#btnSearch").bind('click', function () {
    if (lookupSearchValidation()) {
        $(this).toggle();
        $("#loading").show("fast", function () {
            //method to populate the grid
            LoadLookUpSearchGrid();
        });
    }
});
在html中

<img id="loading" src="Images/spinner.gif" alt="" style="display:none;"/>
<input type="button" value="Search" id='btnSearch' />

当您只在页面上显示微调器而不使用任何javascript时,微调器是否工作?是否确定gif已设置动画?试着用浏览器打开它,检查它是否有动画,否则问题是gif。是的,我检查了它LoadLookUpSearchGrid做什么?浏览器通常不会在解释javascript时呈现网站,包括更新动画。如果这个函数做了很多工作,它可能负责still animationLoadLookUpSearchGrid方法基本上执行ajax调用从服务器获取数据,我认为这需要10-20秒