Skip to content

Instantly share code, notes, and snippets.

@leopic
Created September 10, 2012 23:19
Show Gist options
  • Save leopic/3694722 to your computer and use it in GitHub Desktop.
Save leopic/3694722 to your computer and use it in GitHub Desktop.
<div class="mod notifications-mod">
<div class="hd notification-header">
<h3><a href="#notificationFallBack" id="notification-toggle">Display Notifications</a></h3>
</div>
<div class="bd notifications-body hidden">
<ul>
<li>notification 1</li>
<li>notification 2</li>
<li>notification 3</li>
<li>notification 4</li>
<li>notification 5</li>
<li>notification 1</li>
<li>notification 2</li>
<li>notification 3</li>
<li>notification 4</li>
<li>notification 5</li>
</ul>
</div>
</div>
var body = $('.notifications-body');
$('#notification-toggle').on('click', function(){
if(body.hasClass('hidden')){
body.slideDown().removeClass('hidden');
} else {
body.slideUp().addClass('hidden');
}
});
.hidden {
display: none;
}
.notifications-mod {
border: 1px solid red; margin: 20px auto; width: 300px;
}
.notifications-body {
background: #000; color: #fff; height: 100px; overflow-y: scroll;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment