Skip to content

Commit

Permalink
removed animated header and classie.js plugins and replaced with boot…
Browse files Browse the repository at this point in the history
…strap affix to handle the collapsing menu bar
  • Loading branch information
davidtmiller committed Jun 22, 2016
1 parent c60e29e commit fb65c10
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 174 deletions.
8 changes: 5 additions & 3 deletions css/agency.css
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,19 @@ fieldset[disabled] .btn-xl.active {
.navbar-default .navbar-nav > .active > a {
border-radius: 3px;
}
.navbar-default.navbar-shrink {
}
@media (min-width: 768px) {
.navbar-default.affix {
background-color: #222;
padding: 10px 0;
}
.navbar-default.navbar-shrink .navbar-brand {
.navbar-default.affix .navbar-brand {
font-size: 1.5em;
}
}
header {
background-image: url('../img/header-bg.jpg');
background-repeat: none;
background-repeat: no-repeat;
background-attachment: scroll;
background-position: center center;
-webkit-background-size: cover;
Expand Down
7 changes: 0 additions & 7 deletions css/agency.min.css

This file was deleted.

4 changes: 1 addition & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<body id="page-top" class="index">

<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top">
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
Expand Down Expand Up @@ -648,8 +648,6 @@ <h2>Project Name</h2>

<!-- Plugin JavaScript -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="js/classie.js"></script>
<script src="js/cbpAnimatedHeader.js"></script>

<!-- Contact Form JavaScript -->
<script src="js/jqBootstrapValidation.js"></script>
Expand Down
37 changes: 24 additions & 13 deletions js/agency.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,34 @@
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
*/

// jQuery for page scrolling feature - requires jQuery Easing plugin
$(function() {
(function($) {
"use strict"; // Start of use strict

// jQuery for page scrolling feature - requires jQuery Easing plugin
$('a.page-scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo');
scrollTop: ($($anchor.attr('href')).offset().top - 50)
}, 1250, 'easeInOutExpo');
event.preventDefault();
});
});

// Highlight the top nav as scrolling occurs
$('body').scrollspy({
target: '.navbar-fixed-top'
})
// Highlight the top nav as scrolling occurs
$('body').scrollspy({
target: '.navbar-fixed-top',
offset: 51
});

// Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a:not(.dropdown-toggle)').click(function() {
$('.navbar-toggle:visible').click();
});

// Offset for Main Navigation
$('#mainNav').affix({
offset: {
top: 100
}
})

// Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a:not(.dropdown-toggle)').click(function() {
$('.navbar-toggle:visible').click();
});
})(jQuery); // End of use strict
7 changes: 0 additions & 7 deletions js/agency.min.js

This file was deleted.

45 changes: 0 additions & 45 deletions js/cbpAnimatedHeader.js

This file was deleted.

11 changes: 0 additions & 11 deletions js/cbpAnimatedHeader.min.js

This file was deleted.

Loading

0 comments on commit fb65c10

Please sign in to comment.