Skip to content

Instantly share code, notes, and snippets.

@aligator28
aligator28 / Animated Sandwich Button.js
Last active April 13, 2016 16:13
Animated Sandwich Button (3 horizontal dashes transforms into cross)
$("#sandwich, .menu_item").click(function() {
$("#sandwich").toggleClass("active");
});
@aligator28
aligator28 / SimplePreloader
Created April 10, 2016 16:59
Simple Preloader
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
@aligator28
aligator28 / ResizeElementWhenWindowResizes.js
Last active April 10, 2016 16:57
Resize some element when window resizes
$(document).ready(function() {
function heightDetect() {
//make header height same as window height
$('.main_head').css('height', $(window).height());
}
heightDetect();
$(window).resize(function() {
heightDetect();
});