【问题标题】:asp.net mvc jquery load function and loading image?asp.net mvc jquery 加载函数和加载图像?
【发布时间】:2012-11-27 10:43:13
【问题描述】:

我有以下代码来加载部分视图:

$(document).ready(function () {
    $("#customer_operations_container").load('/Customer/_AddCustomer');
}

我可以显示加载图像吗?

【问题讨论】:

    标签: jquery asp.net-mvc jquery-load


    【解决方案1】:

    做类似的事情

    $(document).ready(function () {
    
        // show loading animation        
        $("#loading-animation").show();
    
        $("#customer_operations_container").load('/Customer/_AddCustomer', function() {
             // this function is the callback of the 'load' method
             // hide loading animation
             $("#loading-animation").hide();
        });
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-03-31
      • 2017-01-18
      • 1970-01-01
      • 2011-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多