Skip to content

Commit

Permalink
Make internationlize button call inName with argument
Browse files Browse the repository at this point in the history
Pull name from DOM and call inName with name as argument
  • Loading branch information
tiernan committed Apr 6, 2016
1 parent 0772b9a commit 9a1a9b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

Expand Down

0 comments on commit 9a1a9b2

Please sign in to comment.