Last active
February 29, 2016 23:33
-
-
Save Tiny-Giant/5cc6e683449f13c212ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) | |
{ | |
'use strict'; | |
var leftDivHeight = $('.testimonial-one').height(); | |
$('.testimonial-wrap .span_1_of_3').eq(0).css('height', leftDivHeight); | |
var rightage = $('.testimonial-two').height(); | |
$('.testimonial-wrap .span_2_of_3').eq(1).css('height', rightage); | |
var rightage1 = $('.testimonial-three').height(); | |
$('.testimonial-wrap .span_2_of_3').eq(2).css('height', rightage1); | |
$(document).ready(function() | |
{ | |
//('.gallery-item img').addClass('wpex-lightbox'); | |
$(document).on('click', 'a[href*="#"]:not([href="#"])', 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) + ']'); | |
if (target.length) | |
{ | |
$('html, body').animate( | |
{ | |
scrollTop: target.offset().top | |
}, 500); | |
return false; | |
} | |
} | |
}); | |
//$(".landscape img").addClass('wpex-lightbox'); | |
$("#faqs dd").hide(); | |
$("#faqs dt").click(function() | |
{ | |
$(this).next("#faqs dd").slideToggle(500); | |
$(this).toggleClass("expanded"); | |
}); | |
$(".questions .button").click((function() | |
{ | |
var shown = false; | |
return function() | |
{ | |
shown = !shown; | |
console.log('1:', shown); | |
if ((shown && !$('#faqs dd:hidden').length) || (!shown && !$('#faqs dd:visible').length)) | |
{ | |
shown = !shown; | |
console.log('2:', shown); | |
} | |
$("#faqs dt").each(function(){ | |
var $dt = $(this); | |
var $dd = $dt.next("#faqs dd"); | |
if ((shown && $dd.is(':hidden')) || (!shown && $dd.is(':visible'))) | |
{ | |
$dt.toggleClass("expanded"); | |
$dd.slideToggle(500); | |
} | |
}); | |
}; | |
})()); | |
// Main menu superfish | |
$('ul.sf-menu').superfish( | |
{ | |
delay: 200, | |
animation: | |
{ | |
opacity: 'show', | |
height: 'show' | |
}, | |
speed: 'fast', | |
cssArrows: false, | |
disableHI: true | |
}); | |
// Mobile Menu | |
$('#navigation-toggle').sidr( | |
{ | |
name: 'sidr-main', | |
source: '#sidr-close, #site-navigation, #mobile-search', | |
side: 'left' | |
}); | |
$('.sidr-class-toggle-sidr-close').click(function() | |
{ | |
$.sidr('close', 'sidr-main'); | |
return false; | |
}); | |
// Close the menu on window change | |
$(window).resize(function() | |
{ | |
$.sidr('close', 'sidr-main'); | |
}); | |
// Prettyphoto => for desktops only | |
if ($(window).width() > 767) | |
{ | |
// PrettyPhoto Without gallery | |
$('.wpex-lightbox').prettyPhoto( | |
{ | |
show_title: false, | |
social_tools: false, | |
slideshow: false, | |
autoplay_slideshow: false, | |
wmode: 'opaque' | |
}); | |
//PrettyPhoto With Gallery | |
$("a[rel^='wpexLightboxGallery']").prettyPhoto( | |
{ | |
show_title: false, | |
social_tools: false, | |
autoplay_slideshow: false, | |
overlay_gallery: true, | |
wmode: 'opaque' | |
}); | |
} | |
}); // End doc ready | |
$(window).load(function() | |
{ | |
// Homepage FlexSlider | |
$('#homepage-slider').flexslider( | |
{ | |
animation: 'slide', | |
slideshow: true, | |
smoothHeight: true, | |
controlNav: true, | |
directionNav: false, | |
prevText: '<span class="fa fa-angle-left"></span>', | |
nextText: '<span class="fa fa-angle-right"></span>', | |
controlsContainer: ".flexslider-container" | |
}); | |
// Post FlexSlider | |
$('div.post-slider').flexslider( | |
{ | |
animation: 'slide', | |
slideshow: true, | |
smoothHeight: true, | |
controlNav: false, | |
directionNav: true, | |
prevText: '<span class="fa fa-angle-left"></span>', | |
nextText: '<span class="fa fa-angle-right"></span>', | |
controlsContainer: ".flexslider-container" | |
}); | |
}); // End on window load | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment