This commit is contained in:
2018-06-01 17:07:02 +02:00
parent 03ef9e8426
commit f4b45a7213
17 changed files with 642 additions and 56 deletions
+13 -5
View File
@@ -1,3 +1,6 @@
function divisionnav() {
$('.navigation li:nth-child(n+4)').wrapAll("<div class='cc' />")
}
function activenav() {
// Cache selectors
var lastId,
@@ -6,7 +9,7 @@ function activenav() {
// All list items
menuItems = topMenu.find("a"),
// Anchors corresponding to menu items
scrollItems = menuItems.map(function(){
scrollItems = menuItems.map(function(){
var item = $($(this).attr("href"));
if (item.length) { return item; }
});
@@ -14,7 +17,6 @@ function activenav() {
// Bind click handler to menu items
// so we can get a fancy scroll animation
// Bind to scroll
$(window).scroll(function(){
// Get container scroll position
@@ -35,10 +37,16 @@ function activenav() {
menuItems
.parent().removeClass("active")
.end().filter("[href='#"+id+"']").parent().addClass("active");
}
}
});
}
};
jQuery(document).ready(function($) {
function iswhite() {
$('.navigation li').midnight();
};
$(document).ready(function() {
// divisionnav();
activenav();
iswhite();
});