jQuery महत्वपूर्ण प्रश्न और उत्तर:
प्रतियोगी परीक्षाओं के लिए jQuery महत्वपूर्ण प्रश्न और उत्तर । उत्तर के साथ ये बहुविकल्पीय प्रश्न बोर्ड परीक्षाओं के साथ-साथ प्रतियोगी परीक्षाओं के लिए बहुत महत्वपूर्ण हैं। इस आर्टिकल में jQuery से संबंधित जानकारी को मुख्य रूप से प्रतियोगी और बोर्ड की परीक्षाओं के लिए बनाया गया है।
1. $.foo() is equivalent to..
- jQuery.foo()
- javascript.foo()
- document.foo()
- None of the above
Answer: jQuery.foo()
2. var ps = $(“p”); ps will be..
- A jQuery object
- An array
- A linked list
- A hash or dictionary
Answer: A jQuery object
3. The CSS selector engine that jQuery uses is called?
- Sizzle
- Mango
- Badaboom
- AwesomeX
Answer: Sizzle
4. The jQuery library contains the following features
- JavaScript Effects and animations. HTML DOM traversal and modification. AJAX.
Utilities
- HTML element selections. HTML element manipulation .HTML event functions
- CSS manipulation. JavaScript Effects and animations. HTML DOM traversal and modification
- all of the above
Answer: all of the above
5. AJAX and jQuery
- With jQuery AJAX, you can request TXT, HTML, XML or JSON data from a remote server using both HTTP Get and HTTP Post
- jQuery provides a rich set of methods (functions) for AJAX web development
- a and b
- AJAX and jQuery are cross-platform (you can develop in Windows and serve on a Unix platform)
Answer: a and b
7. Which of the following sign is used as a shortcut for jQuery?
- the % sign
- the & sign
- the $ sign
- the @ sign
Answer: the $ sign
8. $(this) in jQuery is used when –
- an HTML element references the entire document
- an HTML element references its own action
- an HTML element references the action of its parent element
- All of the above
Answer: an HTML element references its own action
9. Which jQuery method is used to set one or more style properties to the selected element?
- The html() method
- The style() method
- The css() method
- All of the above
Answer: The css() method
10. Which of the following jQuery method is used to hide the selected elements?
- The hidden() method
- The hide() method
- The visible(false) method
- The display(none) method
Answer: The hide() method
11. Who developed jQuery, and in which year it was first released?
- John Richard in 2001
- Mark Bensman in 2004
- John Resig in 2006
- None of the above
Answer: John Resig in 2006
12. Which of the following jQuery method can be used to deal with the name conflicts?
- The conflict() method
- The nameConflict() method
- The noConflict() method
- None of the above
Answer: The noConflict() method
13. The jQuery method used to perform an asynchronous HTTP request –
- jQuery ajaxSetup() method
- jQuery ajaxSync() method
- jQuery ajax() method
- None of the above
Answer: jQuery ajax() method
14. The correct syntax to set the background color of all h1 elements to yellow in jQuery –
- $(“h1”).style(“background-color”,”yellow”);
- $(“h1”).html(“background-color”,”yellow”);
- $(“h1”).css(“background-color”,”yellow”);
- $(“h1”).layout(“background-color”,”yellow”);
Answer: $(“h1”).css(“background-color”,”yellow”);
15. Which of the following jQuery method is used to stop jQuery for few milliseconds?
- stop() method
- delay() method
- slowdown() method
- pause() method
Answer: delay() method
16. Which of the jQuery function prevents the code from running before the loading of the document finishes?
- $(document).load()
- $(document).unload()
- $(document).ready()
- $(document).trim()
Answer: $(document).ready()
17. What does the syntax $(“p.para”) will select?
- The first paragraph element with class = “para”
- The first paragraph element with id = “para”
- The first paragraph element with name = “para”
- All paragraph elements with class = “para”
Answer: All paragraph elements with class = “para”
18. The jQuery used to find all next sibling elements after the current element is –
- find() method
- nextAll() method
- siblings() method
- None of the above
Answer: nextAll() method
19. Which of the following jQuery method is used to attach a handler to an event?
- unbind() method
- attach() method
- bind() method
- None of the above
Answer: bind() method
20. Which of the following jQuery method is used to check whether or not the selected elements have the specified class name?
- hasClass() method
- addClass() method
- find() method
- toggleClass() method
Answer: hasClass() method
21. The correct syntax for selecting the first paragraph element with id p1 is –
- $(“p.p1:first”)
- $(“p#p1:first”)
- $(“p1#p:first”)
- None of the above
Answer: $(“p#p1:first”)
22. Which of the following jQuery method is used to set the value of an element?
- val() method
- setValue() method
- content() method
- None of the above
Answer: val() method
23. The jQuery method used to get all ancestors of the matched set of elements is
- parents() method
- parent() method
- offsetParent() method
- None of the above
Answer: parents() method
24. The jQuery method used to set the width property of an element is –
- setWidth( val ) method
- width( val ) method
- setCSSWidth( val ) method
- None of the above
Answer: width( val ) method
25. The jQuery method used to remove the set of matched elements is –
- delete() method
- empty() method
- remove() method
- None of the above
Answer: remove() method
26. What does the syntax $(“div#myDiv .para”) will select?
- It will select all elements with class = “para” within the div element with id = “myDiv”
- It will select all elements with id = “myDiv” within the div element with class = “para”
- All div elements with class = “para” or with id = “myDiv”
- None of the above
Answer: It will select all elements with class = “para” within the div element with id = “myDiv”
27. The jQuery method used for parsing the JSON text is –
- parseJSON() method
- parseHTML() method
- noConflict() method
- each() method
Answer: jQuery.parseJSON() method
28. Which of the following method is used to toggle between the fadeIn() method and fadeOut() method?
- toggle() method
- fadeToggle() method
- slideToggle() method
- animate() method
Answer: fadeToggle() method
29. The toggle() method in jQuery is used to –
- toggle between the hide() and show() methods
- toggle between the fadeIn() and fadeOut() methods
- toggle between the slideUp() and slideDown() methods
- None of the above
Answer: toggles between the hide() and show() methods
30. The :even and :odd filters in jQuery are used to –
- determine if the number is odd or even
- determine if the index position of an element is odd or even
- both (a) & (b)
- None of the above
Answer: determine if the index position of an element is odd or even