Created
June 14, 2012 19:18
-
-
Save AllanD/2932328 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* equal heights ------------ */ | |
(function($) { | |
$.fn.equalHeights = function(minHeight, maxHeight) { | |
tallest = (minHeight) ? minHeight : 0; | |
this.each(function() { | |
if($(this).height() > tallest) { | |
tallest = $(this).height(); | |
} | |
}); | |
if((maxHeight) && tallest > maxHeight) tallest = maxHeight; | |
return this.each(function() { | |
$(this).height(tallest).css("overflow","auto"); | |
}); | |
} | |
})(jQuery); | |
jQuery(document).ready(function ($) { | |
$('.equalHeights .panel').equalHeights(); | |
orbitSlider(); | |
$('.toggleUserMenu').on('click', function() { | |
$('.userMenu').fadeToggle('fast'); | |
}) | |
// PJAX LOADS | |
$(document).on('pjax:success', function() { | |
$('.equalHeights .panel').equalHeights(); | |
orbitSlider(); | |
}); // END pjax:success | |
}); // END document.ready | |
var orbitSlider = function() { | |
/* ORBIT SLIDER ------------- */ | |
$('#featured').orbit({ | |
animation: 'fade', // fade, horizontal-slide, vertical-slide, horizontal-push | |
animationSpeed: 800, // how fast animtions are | |
timer: true, // true or false to have the timer | |
advanceSpeed: 4000, // if timer is enabled, time between transitions | |
pauseOnHover: false, // if you hover pauses the slider | |
startClockOnMouseOut: false, // if clock should start on MouseOut | |
startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again | |
directionalNav: true, // manual advancing directional navs | |
captions: true, // do you want captions? | |
captionAnimation: 'fade', // fade, slideOpen, none | |
captionAnimationSpeed: 800, // if so how quickly should they animate in | |
bullets: false, // true or false to activate the bullet navigation | |
bulletThumbs: false, // thumbnails for the bullets | |
bulletThumbLocation: '', // location from this file where thumbs will be | |
afterSlideChange: function(){} // empty function | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment