JQuery MCQ Questions and Answers Quiz

11. $("span"). What does it select?

  1. All span elements
  2. The first span element
  3. Last spam element
  4. non of these

12. The jQuery html() method works for both HTML and XML documents

  1. false statement
  2. true statement

13. What is the correct jQuery code to set the background color of all p elements to blue?

  1. $("p").layout("background-color","blue");
  2. $("p").manipulate("background-color","blue");
  3. $("p").css("background-color","blue");
  4. $("p").style("background-color","blue");

14. Which jQuery method is used to hide selected elements?

  1. hidden()
  2. visible(false)
  3. display(none)
  4. hide()

15. jQuery method to set one or more style properties for selected elements?

  1. style()
  2. css()
  3. html()
  4. xml()

16. Which jQuery method is used to perform an asynchronous HTTP request?

  1. jQuery.ajaxServer()
  2. jQuery.ajaxAsync()
  3. jQuery.ajaxSetup()
  4. jQuery.ajax()

17. Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?

  1. switch()
  2. switchClass()
  3. toggleClass()
  4. altClass()

18. Which jQuery function is used to prevent code from running, before the document is finished loading?

  1. $(document).load()
  2. $(body).onload()
  3. $(document).ready()
  4. non of these

19. You can test whether the browser supports specific features using...

  1. $.support
  2. $.browser
  3. $.browserTest
  4. $.supportTest

20. Load remote data using HTTP GET

  1. $.get(url,data,callback,type)
  2. $.ajax(options)
  3. $.post(url,data,callback,type)
  4. $.getScript(url,callback)
Tags

MCQ Multiple Choice Questions and Answers on JQuery

JQuery Question and Answer