diff --git a/js/random_quote.js b/js/random_quote.js index 7d738b0..4021af4 100644 --- a/js/random_quote.js +++ b/js/random_quote.js @@ -169,10 +169,10 @@ function celebrateSeeingItAll(){ function registerClickListeners(){ //Needed beacause onTouchEnd is used for mobile vibrations instead of onclick var eventType; - if (navigator.userAgentData.mobile){ - eventType = 'touchend'; - } else { + if (!(navigator.userAgentData.mobile)){ eventType = 'click'; + } else { + eventType = 'touchend'; } document.getElementById('button_previous').addEventListener(eventType, previousItem); document.getElementById('button').addEventListener(eventType, randomItem);