Попробуйте это:
JQuery:
$(document).ready(function() {
$("div.panel_button").click(function(){
$("div#panel").animate({
height: "100%"
})
$("div#main").hide();
});
$("div#hide_button").click(function(){
$("div#panel").animate({
height: "0px"
}, "fast");
$("div#content").show();
});
});
Кстати, для вышеизложенного вы можете изменить значение высоты на желаемое значение.
CSS:
.panel_button1 a {
YOUR STYLING HERE } /* for the exit button */
.panel_button {
width: YOUR VALUE HERE;
position: relative; } /* for the activation button styling */
.panel_button a {
YOUR STYLING HERE }
/* for the activation button styling */
#panel {
position: fixed;
width: VALUE OF YOUR CHOICE;
height: 0%; /*THIS CANNOT CHANGE UNLESS YOU WANT IT TO START AT A SPECIFIC HEIGHT. IF YOU WANT IT HIDDEN, DO NOT CHANGE IT*/
overflow: hidden;
z-index: 25;
background-color: COLOUR OF YOUR CHOICE;
} /* drop down colour */
#panel_contents {
height: VALUE OF YOUR CHOICE;
width: VALUE OF YOUR CHOICE;
position: absolute;
z-index: 999; } /* drop down text */
#content {
CONTENT STUFF HERE }
Применение:
Activation: <br> <div class="panel_button" style="display: visible;"><a href="#panel">blahblahblah</a></div>
Кнопка «Содержимое и выход»:
<div id="panel">
<div class="panel_button1" id="hide_button" style="display: visible;"><a href="#">EXIT BUTTON TEXT OR STUFF.</a></div>
<div id="panel_contents">
WHAT YOU SEE WHEN THIS THING DROPS DOWN. LIKE TEXT STUFF.
</p>
</div>
</div></div>