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.
精彩评论