Browse files

making the js flip work again now that it's links instead of buttons

  • Loading branch information...
1 parent c042f02 commit bc6d0b2b02ebbcb9d0aa220272fe3c8b80e1e2ff Dirk Ginader committed May 12, 2012
Showing with 8 additions and 6 deletions.
  1. +8 −6 express/public/javascripts/daily-myths.js
View
14 express/public/javascripts/daily-myths.js
@@ -2,17 +2,21 @@ $(document).ready(function() {
var is_chrome = /chrome/.test( navigator.userAgent.toLowerCase() ); //chrome is still misbehaving sometimes
$('html').addClass('run');
- $('#yes').click(function(){
+ $('#yes').click(function(e){
+ e.preventDefault();
$('#answer .yes').show();
$('#answer .no').hide();
});
- $('#no').click(function(){
+ $('#no').click(function(e){
+ e.preventDefault();
$('#answer .no').show();
$('#answer .yes').hide();
});
- $('#yes, #no').click(function(){
+ $('#yes, #no').click(function(e){
+ e.preventDefault();
+ $('.block').addClass('flip');
setTimeout(function(){
$('#answer .galaxy').show();
if(is_chrome){
@@ -22,9 +26,7 @@ $(document).ready(function() {
}, 500);
});
- $('.block .cta button').click(function(){
- $('.block').addClass('flip');
- });
+
$('.block .back h2').click(function(e){
$('.block').removeClass('flip');
e.preventDefault();

0 comments on commit bc6d0b2

Please sign in to comment.