Window
Photography
diff --git a/js/agency.js b/js/agency.js
index 17089b3..2561fc4 100644
--- a/js/agency.js
+++ b/js/agency.js
@@ -2,7 +2,7 @@
"use strict"; // Start of use strict
// Smooth scrolling using jQuery easing
- $('a[href*="#"]:not([href="#"])').click(function() {
+ $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
@@ -15,17 +15,17 @@
}
});
+ // Closes responsive menu when a scroll trigger link is clicked
+ $('.navbar .js-scroll-trigger').click(function() {
+ $('.navbar-collapse').collapse('hide');
+ });
+
// Activate scrollspy to add active class to navbar items on scroll
$('body').scrollspy({
target: '#mainNav',
offset: 54
});
- // Closes responsive menu when a link is clicked
- $('.navbar-collapse>ul>li>a').click(function() {
- $('.navbar-collapse').collapse('hide');
- });
-
// Collapse the navbar when page is scrolled
$(window).scroll(function() {
if ($("#mainNav").offset().top > 100) {
diff --git a/js/agency.min.js b/js/agency.min.js
index c45909c..2e0ed47 100644
--- a/js/agency.min.js
+++ b/js/agency.min.js
@@ -3,4 +3,4 @@
* Copyright 2013-2017 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-agency/blob/master/LICENSE)
*/
-!function(a){"use strict";a('a[href*="#"]:not([href="#"])').click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var n=a(this.hash);if((n=n.length?n:a("[name="+this.hash.slice(1)+"]")).length)return a("html, body").animate({scrollTop:n.offset().top-54},1e3,"easeInOutExpo"),!1}}),a("body").scrollspy({target:"#mainNav",offset:54}),a(".navbar-collapse>ul>li>a").click(function(){a(".navbar-collapse").collapse("hide")}),a(window).scroll(function(){a("#mainNav").offset().top>100?a("#mainNav").addClass("navbar-shrink"):a("#mainNav").removeClass("navbar-shrink")})}(jQuery);
\ No newline at end of file
+!function(a){"use strict";a('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var e=a(this.hash);if((e=e.length?e:a("[name="+this.hash.slice(1)+"]")).length)return a("html, body").animate({scrollTop:e.offset().top-54},1e3,"easeInOutExpo"),!1}}),a(".navbar .js-scroll-trigger").click(function(){a(".navbar-collapse").collapse("hide")}),a("body").scrollspy({target:"#mainNav",offset:54}),a(window).scroll(function(){a("#mainNav").offset().top>100?a("#mainNav").addClass("navbar-shrink"):a("#mainNav").removeClass("navbar-shrink")})}(jQuery);
\ No newline at end of file
diff --git a/js/contact_me.js b/js/contact_me.js
index 5323770..6e91590 100644
--- a/js/contact_me.js
+++ b/js/contact_me.js
@@ -51,9 +51,9 @@ $(function() {
//clear all fields
$('#contactForm').trigger("reset");
},
- complete: function () {
- setTimeout(function () {
- $this.prop("disabled", false); // Re-enable submit button when AJAX call is complete
+ complete: function() {
+ setTimeout(function() {
+ $this.prop("disabled", false); // Re-enable submit button when AJAX call is complete
}, 1000);
}
});