Bonsai Project



I'm fairly sure my code is correct but i'm getting an error in the console, saying i'm missing a closing ) on line 3.
However everything is closed. Would appreciate some help, my code is -

var main = function() {
var toAdd = $('#top-text').val();
var toAdd = $('#bottom-text').val(){


Many thanks


Hi Andrew,

On line 5, you need a semi-colon (;) instead of a colon (:) :)


Thanks for the reply, I found the colon and fixed that earlier but it's still not working :frowning:


OK, I see your other problem :)
Between the parenthesis (()) of text(), you need to add toAdd, like this:

/* ... */.text(toAdd);


Brill, thanks it's working now!


Hi Andy, I was just looking through your post and noticed you didn't add any code for the keyup event handler to update the meme's image. Just thought i would point that out for yourself and future readers. Happy coding!


@cmm21 The code looks fine to me, after applying the fixes I've suggested. Could you point out where the problem you're seeing in the code is?


@zystvan The code is fine, but the instructions also ask for the user to add code to change the background image.

[Edit by moderator: removed code]


@cmm21 Thanks for clarifying. I just assumed that Andrew was on an earlier step, I guess :)

I've had to edit your post to remove the code since it's against the forum guidelines to post stuff like that, but thanks for posting it anyway.