开发者

hide + load + slideDown(), can't see the effect

Intro,

I'm trying to write a new fun开发者_StackOverflow社区ction to load content using the slideDown() effect from Jquery

This is the function, the content gets loaded properly, but i just don't see the Slide effect, i guess because it might be done before the content its loaded, so:

function load_something(nombre,tipo){
            $("#router").prepend(loader_image);
            $("#router").load('/includes/router.php?nombre='+encodeURI(nombre)+'&tipo='+tipo,function(){
                $("#router").slideDown(600); return false;
            });
}

Tried also:

$(div).hide().slideDown(time);

getting same result

Question,

What i am doing wrong?

Thank you !


Your code looks okay.

I think you need to start off with router hidden in order to see the effect. If you have an external style sheet add:

#router {display: none;}

so that the content is hidden until you execute your function, triggering the slidedown effect.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜