Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Ability to hide/show the intro if there's only one slide
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Uhlmann committed Oct 16, 2014
1 parent 5f94f2e commit f3f8646
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions assets/js/onReady.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ var wrapper,elements,showElementTimer;
var marginLeft = $(this).width() / 2;
$(this).css('marginLeft', - marginLeft);
});

$('html').keydown(function (e) {
if (e.which == 27 && $('#intro').length) {
// ESC: Show/Hide Intro
$('#intro').fadeToggle('slow');
}
});
if ($('body').data('show-intro')) {
$('#intro').show();
}
Expand All @@ -45,10 +50,7 @@ var wrapper,elements,showElementTimer;
}
});
$('html').keydown(function (e) {
if (e.which == 27 && $('#intro').length) {
// ESC: Show/Hide Intro
$('#intro').fadeToggle('slow');
} else if (e.which == 32) {
if (e.which == 32) {
// Space: Next Step
if ($('#intro:visible').length) {
$('#intro').fadeOut('slow');
Expand Down

0 comments on commit f3f8646

Please sign in to comment.