1 |
- $(".nav-toggle").on("touchstart click",function(o){o.preventDefault(),$(this).toggleClass("active")}),$(function(){var e=$(".navbar").height();$(window).on("scroll",{previousTop:0},function(){var o=$(window).scrollTop();o<this.previousTop?0<o&&$(".navbar").hasClass("fixed")?$(".navbar").addClass("visible"):$(".navbar").removeClass("visible fixed"):($(".navbar").removeClass("visible"),e<o&&!$(".navbar").hasClass("fixed")&&$(".navbar").addClass("fixed")),this.previousTop=o})}),$("#comments").hide(),$(".toggle-comments").on("touchstart click",function(o){o.preventDefault(),$("#comments").toggle("slow",function(){var o=$(".toggle-comments"),e="Hide Comments"===o.text()?"Show Comments":"Hide Comments";$(o).text(e)})}),$("#commentform").validate({rules:{author:{required:!0,minlength:2},email:{required:!0,email:!0},comment:{required:!0,minlength:20}},messages:{author:"Please enter in your name.",email:"Please enter a valid email address.",comment:"Nothing to Say?"},errorElement:"div",errorPlacement:function(o,e){e.before(o)}}),$(document).ready(function(){cookieNotification()});var hideCookieNotification=function(){$(".js-cookie-notification").delay(5e3).fadeOut("slow"),Cookies.set("EU-GDPR-Cookie","true",{expires:365})},cookieNotification=function(){"true"===Cookies.get("EU-GDPR-Cookie")?console.log("EU GDPR cookie notification set"):(console.log("EU GDPR cookie notification not set"),$(".js-cookie-notification").css({display:"block"}),$(".js-cookie-notification").find(".js-cookie-notification-hide").click(function(){return $(".js-cookie-notification").fadeOut("slow"),Cookies.set("EU-GDPR-Cookie","true",{expires:365}),!1}))};
|