Create a gist now

Instantly share code, notes, and snippets.

JavaScript for main.js
(function ($) {
// Hide all shortcuts and notes
var hideAll = function() {
$('.shortcuts').hide();
$('.notes').hide();
};
// animate the platform buttons when user chooses one before taking them page.
$('.platform').on('click', function(e) {
var url = this.href;
var $target = $(this).parent();
e.preventDefault();
$target.addClass('active').siblings().hide();
$target.animate({
width: '90%',
height: '500px',
opacity: 0
}, 1000, function() {
window.location = url;
});
});
// toggle display of shortcuts when clicking on header
$('h2').on('click keypress', function(){
$(this).parent().find('.shortcuts, .notes').slideToggle();
});
hideAll();
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment