FAQ: jQuery Setup - Why jQuery?


#1

This community-built FAQ covers the “Why jQuery?” exercise from the lesson “jQuery Setup”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Introduction to jQuery

FAQs on the exercise Why jQuery?

Join the Discussion. Help a fellow learner on their journey

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!


#2

why do I need four div and class at the beginning ? what would be the problem if we start with one?

<div class='container'>
    <div class='product-card'>
      <div class='product-photo sole-air-ii'></div>
      <div class='product-details'>```

#3
 <div class='product-photo sole-air-ii'></div>

how does this one works ? there is nothing inside the div?
these are so confusing :disappointed:


#4

I don’t think they were meant to do anything or maybe they are reserved for future use


#5

This is an identified element that the script can hook on to so it can insert new content into the DOM (that will display in the page). In static pages we would not expect to see empty elements, but a dynamic page might have several. They all have a purpose in the session.