From 1cda178609e6946b6791fe2dd7c6af7a151f2eb4 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Fri, 24 Oct 2014 12:29:29 +0300 Subject: robot: fix undefined variable from define addition --- scripts/robot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/robot.js') diff --git a/scripts/robot.js b/scripts/robot.js index 4b449210..15265b78 100644 --- a/scripts/robot.js +++ b/scripts/robot.js @@ -22,7 +22,7 @@ sentence+='#John likes #Apples and #Oranges and #Pistachio|'; sentence+='#Click on any #Node to change and modify it|'; sentence+='#Play around and have #Fun!|'; -var robot = function (sentence) { +var robot = function (element, sentence) { var r = { speed: 1, counter: 0, @@ -57,7 +57,7 @@ var robot = function (sentence) { } $('.logo').click(function(){ - setTimeout( robot(sentence).next_event, 1000 ); + setTimeout( robot(undefined, sentence).next_event, 1000 ); }); /*var answer = confirm ("Would you like a tutorial?") -- cgit v1.3.1