我似乎无法弄清楚如何从下到上而不是从上到下显示隐藏的内容。我在这里做了一些功课,并从 jQuery UI 中找到了一个解决方案,但一定是错误地实现了它。非常感谢任何帮助 - 脚本新手。
干杯!
这是我正在使用的
剧本:
$(document).ready(function() {
$('#clientsOpen').click(function() {
$('#clientsDropDown #clientsDashboard').slideToggle({ direction: "up" }, 300);
$(this).toggleClass('clientsClose');
}); // end click
});
标记:
<div id="clientsDropDown">
<div id="clientsDashboard">
<p id="clientsCTA">Let's make something beautiful together...<br /><a href="mailto:brockman.eric@gmail.com">brockman.eric@gmail.com</a></p>
</div><!-- /clientsDashboard -->
<p id="clientsOpen">clients</p>
</div><!-- //clientsDropDown -->
样式:
#clientsDropDown {
bottom:0;
width: 100%;
padding-bottom:2%;
z-index: 100;
}
#clientsOpen {
background: url("images/open.png") no-repeat scroll 68px 10px #414142;
color: #ececec;
cursor: pointer;
float: left;
font-size: 26px;
margin: -2px 0 0 10%;
padding: 0 15px 2px;
text-decoration: none;
width: 63px;
}
#clientsCTA {
background:#414142;
width:100%;
color: #CCCCCC;
text-align:center;
font-size: 46px;
margin: 0;
padding: 30px 0;
text-decoration: none;
}
#clientsDropDown .clientsClose {
background-image: url(images/close.png);
}
#clientsDropDown #clientsDashboard {
display: none;
}