jQuery Tutorial menu

jQuery Quiz

Check what you have learned in this jQuery tutorial. Answer each question, then read the explanation.

How to Use This Quiz

  • There are 8 questions covering the whole tutorial
  • Choose one answer for each question
  • If you get one wrong, open that lesson again and run its examples

Questions

Exercise

1. What does the $ sign mean in jQuery code?

Exercise

2. Why do we put code inside $(function () { ... })?

Exercise

3. Which selector finds the element with id="cart"?

Exercise

4. Which method is the recommended way to attach an event handler in jQuery 3?

Exercise

5. Which code fades an element out over 1 second?

Exercise

6. What does $("#name").val() do with no argument?

Exercise

7. What is the difference between remove() and empty()?

Exercise

8. Which line selects all the other elements at the same level as the clicked element?

What Next?

Well done for finishing the jQuery tutorial. Keep practising with plain JavaScript, and try TypeScript when you are ready for larger projects.

Want to build real websites with a teacher? Join the Workownix Web Development course, online or at our institute in Orangi Town, Karachi.

Learn jQuery with a teacher

Join the Web Development course at Workownix, online or in Orangi Town, Karachi, and get a certificate.

See the course Ask on WhatsApp