1

我有这个标记:

<div id="logo" style="text-align:center;">
    <p>AXIS'14</p>
    <a id="enter" onclick="EnterSite()">Enter Website</a><br>
</div>

<div id="content">
  //content here
</div>  

和 javascript:

<script>
        $(window).load(function(){
         // executes when complete page is fully loaded, including all frames, objects and images
         $("#enter").fadeIn(1000);
        });
</script>  

<script type="text/javascript">
        $(window).load(function EnterSite() {
            $("#logo").fadeOut(500);      
            $("#content").fadeIn(1000);
        });
                //this initialize the grid gallery

        $(function() {
            $( '#sg-panel-container' ).gridgallery();
        });
</script>   

我想要的是在加载窗口后Enter Website链接应该出现,点击它会淡出logodiv 并显示contentdiv。目前正在发生的事情就在这里

4

1 回答 1

1

你可能应该这样做:

<script>
        $(window).load(function(){
         // executes when complete page is fully loaded, including all frames, objects and images
         $("#enter").fadeIn(1000);
        });
</script>  

<script type="text/javascript">
        $(document).ready(function () {
            $("#enter").click(function () {
                $("#content").fadeIn(1000);
            });
        });
            $(document).ready(function(){
                $("#enter").click(function () {
                $( '#sg-panel-container').gridgallery();
            });
        });
</script>
于 2013-11-10T08:38:57.380 回答