Skip to content

Commit

Permalink
Show content only after the sound is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
dorukeker committed Dec 15, 2015
1 parent ce42a04 commit 15e06a9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script type="text/javascript" src="forcetouch.js"></script>
</head>
<body>
<div class="container">
<div class="container hidden">
<div class="col-xs-4">
<span id="label1" class="current">0.00</span>
</div>
Expand Down
6 changes: 5 additions & 1 deletion prank.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
var sound = new Howl({
urls: ['crack.mp3']
urls: ['crack.mp3'],
onload: function(){
// makes sure the sound is loaded. then shows the html content
$('.container').removeClass('hidden');
}
});


Expand Down
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ span.done{
height: 100%;
display: none;
}

.hidden{
display: none;
}

0 comments on commit 15e06a9

Please sign in to comment.