mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-23 01:30:09 +01:00
4 lines
1.7 KiB
JavaScript
4 lines
1.7 KiB
JavaScript
/*! ascribe - v0.0.1
|
|
* http://wordpress.org/themes
|
|
* Copyright (c) 2015; * Licensed GPLv2+ */
|
|
$(document).ready(function(){function a(){$(".current-menu-item a").click(function(a){a.preventDefault(),$("#menu-landing-page-menu").toggleClass("active")})}function b(){$(".case-study:gt(0)").addClass("hidden"),$(".slider-action").click(function(){var a=$(this).attr("id");"back"===a?($(".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 c(){jQuery("img.social-icon").each(function(){var a=jQuery(this),b=a.attr("id"),c=a.attr("class"),d=a.attr("src");jQuery.get(d,function(d){var e=jQuery(d).find("svg");"undefined"!=typeof b&&(e=e.attr("id",b)),"undefined"!=typeof c&&(e=e.attr("class",c+" replaced-svg")),e=e.removeAttr("xmlns:a"),a.replaceWith(e)},"xml")})}function d(){$(".featured-faqs dt").click(function(){$(this).next("dd").toggleClass("open")})}function e(){$(".top-tab").click(function(){$(".top-tab").removeClass("active"),$(this).addClass("active");var a=$(this).data("tab");$(".marketplace-info").removeClass("active"),$("#"+a).addClass("active")})}function f(){$(".hamburger").click(function(){console.log("hi"),$(".mobile-nav").toggleClass("active")})}function g(){var a=!1,b=$(".sticky");$(window).scroll(function(){a=!0}),setInterval(function(){a&&(a=!1,$(window).scrollTop()>100?b.addClass("stuck"):b.removeClass("stuck"))},250)}function h(){$(".team-member img").hover(function(){var a=$(this).data("hover");$(this).attr("src",a)},function(){var a=$(this).data("regular");$(this).attr("src",a)})}b(),c(),d(),e(),a(),f(),g(),h()}); |