开发者

How to call fadeOut() after load()

开发者 https://www.devze.com 2023-02-04 14:40 出处:网络
$(\'#page_name\').load(url + \'开发者_开发百科 #page_name\') // url - some container. ex - #container
$('#page_name').load(url + '开发者_开发百科 #page_name') // url - some container. ex - #container
$('#page_name').delay(300).fadeIn(1000)

and nothing :(

Trying live(), but nothing comes out


Use the callback function for load.

$('#page_name').load(url + ' #page_name', function() {
    $(this).fadeIn(1000);
});

I don't think you can use .delay in this context.

The .delay() method is best for delaying between queued jQuery effects.


Fade the content in from within $.load's success callback:

$('#page_name').load(url + ' #page_name', function() {
    $(this).fadeIn(1000)
});
0

精彩评论

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

关注公众号