开发者

jquery effects after load

开发者 https://www.devze.com 2022-12-29 14:26 出处:网络
My slideDown effects didn\'t showup after invoking load method , my code is : $(\"#outerDiv\").load(\"vacation.do #innerDiv\",{},function () {开发者_JAVA技巧$(\"#outerDiv\").slideDown(\"slow\");});

My slideDown effects didn't showup after invoking load method , my code is :

$("#outerDiv").load("vacation.do #innerDiv",{},function () {开发者_JAVA技巧$("#outerDiv").slideDown("slow");});

What's the problem ?


The #outerDiv does not exist when Your code is being run.

    $(document).ready(function(){
     //put Your code here so that it runs when all the HTML content
     // is already parsed by the browser
    });

this is a more understandable version of the $(function(){ /* your code */ }); mentioned before.

0

精彩评论

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

关注公众号