English 中文(简体)
显示装货内容信息
原标题:showing loading content message

我用此刻,在没有一页的复读的情况下,对事件进行动态处理,但为改进未爆弹药,我觉得我们应当增加装载事件或类似事件的时间,但我的努力迄今没有效果。

function calendarAjax () {

    $( #month_nav a ).live( click , function() {
        $( #events_container ).animate({ opacity: "0" }, 200 ).load($(this).attr( href )+  #events_content  , function(){
            $(this).animate({ opacity: "1" }, 600 );
        });
        return false;
    })

};

任何援助都受到高度赞赏。

感谢。

最佳回答

这里有两种办法,即使用

$( #loadingDiv )
    .hide()  // hide it initially
    .ajaxStart(function() {
        $(this).show();
    })
    .ajaxStop(function() {
        $(this).hide();
    });

假设您的装货单是 载荷Div,其中既包括文本,也包括装货图像。

<>Update>

。 http://api.jquery.com 使用$.ajax在“一”下运行。

$.ajaxStart is a way to register a callback to be executed when the first ajax request starts and $.ajaxStop is used the same way to register a callback to be executed when all ajax request completes

因此,如果你使用上述代码显示和隐藏装货舱,就会自动显示,如果您的<代码>$.load功能要求,在亚x要求填写时开始和隐藏,假定你只有一个<代码>,即:aax或。 该页的简短方法。

问题回答

你们需要3件事:

装载器:

<div id="loader">
I m loading something
</div>

CSS 供您装载:

#loader {
   /* some design */
}

3. 要求你采取 j法,以突出其可见度:

var loader = {
    show: function() {
        $( #loader ).show();
    },
    hide: function() {
        $( #loader ).hide();
    }
};

然后,当你想要放弃这一信息时,你只能说<条码>载荷.show()。

http://jquery.malsup.com/block/“rel=“nofollow” Jquery BlockUI plugin符合你的需要。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签