Step 5: Creating a new IMG


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/jquery-ext/projects/jquery-prj_bonsai

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

When running my code, the img in the .header class also change but it should not. I don’t know how to target only the img of the .meme thumbnail class.

Can someone help pls?

```

var main = function() {
('#top-text').keyup(function() { var textinput = (’#top-text’).val();
('.top-caption').text(textinput); }); (’#bottom-text’).keyup(function() {
var textinput = ('#bottom-text').val(); (’.bottom-caption’).text(textinput);
});
('#image-url').keyup(function() { var urlinput = (’#image-url’).val();
$(‘img’).attr(‘src’, urlinput);
});
};

$(document).ready(main);

<do not remove the three backticks above>

#2

Hi, any feedback on this please?


#3

Hi @jp1976,

.meme

Exactly like that, $('.meme') :slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.