Created
September 10, 2012 23:19
-
-
Save leopic/3694722 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var body = $('.notifications-body'); | |
$('#notification-toggle').on('click', function(){ | |
if(body.hasClass('hidden')){ | |
body.slideDown().removeClass('hidden'); | |
} else { | |
body.slideUp().addClass('hidden'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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