Skip to content

Commit

Permalink
Init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesc Puig committed Mar 29, 2016
1 parent 0e5dd50 commit daab931
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
*.bat
*.DS_Store
*.idea
37 changes: 37 additions & 0 deletions css/footerMenu.css
@@ -0,0 +1,37 @@
body {
height: 900px;
}

#footerMenu {
background: black;
width: 100%;
height: 0px;
position: fixed;
z-index: 300;
bottom: 0;
overflow: none;
left: 0;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
-webkit-transition: all 0.4s ease-in-out;
}

#footerMenu.show {
height: 65px;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
-webkit-transition: all 0.4s ease-in-out;
}

#footerMenu ul.navigation li {
float: left;
margin-right: 16px;
display: block;
}

#footerMenu ul.navigation li a:hover {
background-color: #555;
color: white;
}
31 changes: 31 additions & 0 deletions footerMenu.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" rel="stylesheet" media="screen" href="css/footerMenu.css" />
</head>
<body>

Scroll Down :)

<div id="footerMenu">
<div class="content-wrap">
<ul class="navigation">
<li><a href="#menu1">menu1</a></li>
<li><a href="#menu2">menu2</a></li>
<li><a href="#menu3">menu3</a></li>
<li><a href="#menu4">menu4</a></li>
<li><a href="#menu5">menu5</a></li>
<li><a href="#menu6">menu6</a></li>
</ul>
</div>
</div>

<script src="https://code.jquery.com/jquery-2.2.2.min.js" integrity="sha256-36cp2Co+/62rEAAYHLmRCPIych47CvdM+uTBJwSzWjI=" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/footerMenu.js"></script>
<script>
$("body").footerMenu();
</script>

</body>
</html>
11 changes: 11 additions & 0 deletions js/footerMenu.js
@@ -0,0 +1,11 @@
(function( $ ){
$.fn.footerMenu = function() {
$(window).scroll(function() {
if ($(document).scrollTop() > 100) {
$('#footerMenu').addClass("show");
} else {
$('#footerMenu').removeClass("show");
}
});
};
})( jQuery );

0 comments on commit daab931

Please sign in to comment.