tags:

views:

20

answers:

1

Hi everybody :)

There is a div:

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

I have written a 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

+2  A: 

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

Then instead of using hide and show use toggle.

Mark Arnott
Just add style="display:none;" to your DIV tag.
iKnowKungFoo
now working perfect.Thank you Mark.