1
0
mirror of https://github.com/ascribe/wp-theme synced 2024-12-23 09:46:55 +01:00
wp-theme/assets/js/ascribe.js

13 lines
8.0 KiB
JavaScript

/**
** ascribe v0.0.1
** The best WordPress theme ever made!
** http://ascribe.io
**
** Territorial <us@territorial.ca>
**
**
** https://github.com/ascribe/wp-theme.git
**/
$(document).ready(function(){function t(){$("body").hasClass("page-template-template-tour")&&$(".tour-switcher .menu").prepend($(".tour-switcher .current-menu-item")),$(".current-menu-item a").click(function(t){t.preventDefault(),$("#menu-landing-page-menu").toggleClass("active")})}function e(){$(".case-study:gt(0)").addClass("hidden"),$(".slider-action").click(function(){var t=$(this).attr("id");"back"===t?($(".case-study").addClass("hidden"),$(".case-study").last().prependTo(".slide-container").removeClass("hidden")):(displayed=$(".case-study").first(),displayed.addClass("hidden"),$(".case-study").eq(1).removeClass("hidden"),displayed.appendTo(".slide-container"))})}function a(){$(".featured-faqs dt").click(function(){$(this).next("dd").toggleClass("open")})}function i(){$(".top-tab").click(function(){$(".top-tab").removeClass("active"),$(this).addClass("active");var t=$(this).data("tab");$(".marketplace-info").removeClass("active"),$("#"+t).addClass("active")})}function s(){$(".hamburger").click(function(){console.log("hi"),$(".mobile-nav").toggleClass("active")})}function n(){var t=!1,e=$(".sticky");$(window).scroll(function(){t=!0}),setInterval(function(){t&&(t=!1,$(window).scrollTop()>100?e.addClass("stuck"):e.removeClass("stuck"))},250)}function c(){$(".team-member img").hover(function(){var t=$(this).data("hover");$(this).attr("src",t)},function(){var t=$(this).data("regular");$(this).attr("src",t)})}function d(){$("img").each(function(){$(this).removeAttr("width"),$(this).removeAttr("height")})}d(),e(),a(),i(),t(),s(),n(),c()});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzY3JpYmUuanMiXSwibmFtZXMiOlsiJCIsImRvY3VtZW50IiwicmVhZHkiLCJ0b3VyTmF2IiwiaGFzQ2xhc3MiLCJwcmVwZW5kIiwiY2xpY2siLCJlIiwic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9uID0gJCh0aGlzKS5hdHRyKCdpZCcpO1xuXG4gICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09PSAnYmFjaycpIHtcbiAgICAgICAgICAgICAgICAkKCcuY2FzZS1zdHVkeScpLmFkZENsYXNzKCdoaWRkZW4nKTtcbiAgICAgICAgICAgICAgICAkKCcuY2FzZS1zdHVkeScpLmxhc3QoKS5wcmVwZW5kVG8oJy5zbGlkZS1jb250YWluZXInKS5yZW1vdmVDbGFzcygnaGlkZGVuJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBkaXNwbGF5ZWQgPSAkKCcuY2FzZS1zdHVkeScpLmZpcnN0KCk7XG4gICAgICAgICAgICAgICAgZGlzcGxheWVkLmFkZENsYXNzKCdoaWRkZW4nKTtcbiAgICAgICAgICAgICAgICAkKCcuY2FzZS1zdHVkeScpLmVxKDEpLnJlbW92ZUNsYXNzKCdoaWRkZW4nKTtcbiAgICAgICAgICAgICAgICBkaXNwbGF5ZWQuYXBwZW5kVG8oJy5zbGlkZS1jb250YWluZXInKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICB9KTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZmVhdHVyZWRGQVEoKSB7XG4gICAgICAgICQoJy5mZWF0dXJlZC1mYXFzIGR0JykuY2xpY2soZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAkKHRoaXMpLm5leHQoJ2RkJykudG9nZ2xlQ2xhc3MoJ29wZW4nKTtcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIG1hcmtldHBsYWNlcygpIHtcbiAgICAgICAgJCgnLnRvcC10YWInKS5jbGljayhmdW5jdGlvbigpe1xuICAgICAgICAgICAgJCgnLnRvcC10YWInKS5yZW1vdmVDbGFzcygnYWN0aXZlJyk7XG4gICAgICAgICAgICAkKHRoaXMpLmFkZENsYXNzKCdhY3RpdmUnKTtcbiAgICAgICAgICAgIHZhciBjb250ZW50VG9TaG93ID0gJCh0aGlzKS5kYXRhKCd0YWInKTtcbiAgICAgICAgICAgICQoJy5tYXJrZXRwbGFjZS1pbmZvJykucmVtb3ZlQ2xhc3MoJ2FjdGl2ZScpO1xuICAgICAgICAgICAgJCgnIycrY29udGVudFRvU2hvdykuYWRkQ2xhc3MoJ2FjdGl2ZScpO1xuXG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBmdW5jdGlvbiBtb2JpbGVOYXYoKSB7XG4gICAgICAgICQoJy5oYW1idXJnZXInKS5jbGljayhmdW5jdGlvbigpe1xuICAgICAgICAgICAgY29uc29sZS5sb2coJ2hpJyk7XG4gICAgICAgICAgICAgJCgnLm1vYmlsZS1uYXYnKS50b2dnbGVDbGFzcygnYWN0aXZlJyk7XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBmdW5jdGlvbiBzdGlja3lOYXYoKSB7XG4gICAgICAgIHZhciBkaWRTY3JvbGwgPSBmYWxzZTtcbiAgICAgICAgdmFyIHN0aWNreSA9ICQoJy5zdGlja3knKTtcblxuICAgICAgICAkKHdpbmRvdykuc2Nyb2xsKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGRpZFNjcm9sbCA9IHRydWU7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHNldEludGVydmFsKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChkaWRTY3JvbGwpIHtcbiAgICAgICAgICAgICAgICBkaWRTY3JvbGwgPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgIGlmICgkKHdpbmRvdykuc2Nyb2xsVG9wKCkgPiAxMDApIHtcbiAgICAgICAgICAgICAgICAgICAgc3RpY2t5LmFkZENsYXNzKCdzdHVjaycpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc3RpY2t5LnJlbW92ZUNsYXNzKCdzdHVjaycpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgMjUwKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gY29sb3VySG92ZXIoKSB7XG4gICAgICAgICQoJy50ZWFtLW1lbWJlciBpbWcnKS5ob3ZlcihcbiAgICAgICAgICAgIGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICAgICAgdmFyIGhvdmVyID0gJCh0aGlzKS5kYXRhKCdob3ZlcicpO1xuICAgICAgICAgICAgICAgICQodGhpcykuYXR0cignc3JjJyxob3Zlcik7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZnVuY3Rpb24oKXtcbiAgICAgICAgICAgICAgICB2YXIgbm9ybWFsID0gJCh0aGlzKS5kYXRhKCdyZWd1bGFyJyk7XG4gICAgICAgICAgICAgICAgJCh0aGlzKS5hdHRyKCdzcmMnLG5vcm1hbCk7XG4gICAgICAgICAgICB9KTtcbiAgICB9XG4gICAgZnVuY3Rpb24gaW1nQXR0clJlbW92ZXIoKSB7XG4gICAgICAgICQoJ2ltZycpLmVhY2goZnVuY3Rpb24oKXtcbiAgICAgICAgICAgICQodGhpcykucmVtb3ZlQXR0cignd2lkdGgnKTtcbiAgICAgICAgICAgICQodGhpcykucmVtb3ZlQXR0cignaGVpZ2h0Jyk7XG4gICAgICAgIH0pO1xuICAgIH1cblxufSk7XG5cblxuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9