From 9a1a9b286cdee451d6bc668f02089e94a7fbee0a Mon Sep 17 00:00:00 2001 From: Tiernan Date: Tue, 5 Apr 2016 19:31:46 -0700 Subject: [PATCH] Make internationlize button call inName with argument Pull name from DOM and call inName with name as argument --- js/helper.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/helper.js b/js/helper.js index c61c3a5d4f..676d60a49e 100755 --- a/js/helper.js +++ b/js/helper.js @@ -64,8 +64,9 @@ The International Name challenge in Lesson 2 where you'll create a function that */ $(document).ready(function() { $('button').click(function() { - var iName = inName() || function(){}; - $('#name').html(iName); + var $name = $('#name'); + var iName = inName($name.text()) || function(){}; + $name.html(iName); }); });