Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit bc6d0b2b02ebbcb9d0aa220272fe3c8b80e1e2ff 1 parent c042f02
Dirk Ginader authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 express/public/javascripts/daily-myths.js
14 express/public/javascripts/daily-myths.js
View
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.