I need help with Wikipedia project

I can’t assign the returned result from the api to the <div>
with prepend() editors=1011).
Please help! :slight_smile:

1 Like

Your URL says searchTerm, but what you have is searchedThing.

Also, don’t import both Bootstrap 3 and 4. You probably had version 3 in mind. And jQuery should be imported before Bootstrap’s JS file.

1 Like

You have a couple errors. As soon as I made the following changes, it worked for me.

  1. remove all references to Bootstrap 4 in your settings.
  2. jQuery must come before Bootstrap in settings.
  3. You’re calling a variable that doesn’t exist. Change searchTerm to searchedThing

1 Like

Beat me by that much. :stuck_out_tongue_winking_eye:

Thanks a lot guys it really helped :slight_smile:

I have another question, will my code work if i change the $.ajax() with .getJSON() and which one is better to use?

Why don’t you try it :stuck_out_tongue_winking_eye:? (Spoilers: Looks like .getJSON() works fine :thumbsup:)

If .getJSON() worked, that’s what I’ll use, since it’s simpler. But .ajax() will give you more control.

1 Like

Thanks :smile: :wink: