1. Home
  2. Computer Science MCQs
  3. Jquery
  4. Which jQuery method is used to append content to the end…

Added 30 Jan 2024

Which jQuery method is used to append content to the end of selected elements?

  1. append() Correct answer
  2. attach()
  3. addToEnd()
  4. insert()

Correct answer

A. append()

15 views

MCQSEXAM

Explanation

append() inserts content at the end of each selected element, inside it: $("ul").append("<li>New</li>").

prepend() inserts at the beginning, while after() and before() insert outside the element. attach(), addToEnd() and insert() are not jQuery methods.

Want more practice? Try the full set of Computer Science MCQs on MCQsExam.com.

Reference

https://www.w3schools.com/jquery/default.asp

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Jquery MCQs

Practise all Jquery MCQs

Similar MCQs