开发者

Body load and jquery problem

There is a div:

<div id="question">ddddd</div>

I have written a开发者_JS百科 code that hide the other div:

$(document).ready(function() 
        {
             $('div#dialog').hide();
             $('div#question').click(function() 
                {
                  $('div#dialog').show('slow');

                    return false;

                }
        );

     $('a.kapat').click(function() 
        {

             $('.frm').hide('slow');

            return false;

        }
     ); 
     });  

Every thing work perfect, but when page loading, the "div#dialog" is open. How can I fix this? I want to that "div#dialog" be hidden when page loading. Thanks in advance


Make the <div> hidden with css to begin with.

Then instead of using hide and show use toggle.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜