jQuery बहुविकल्पीय प्रश्न और उत्तर – Set 2:
प्रतियोगी परीक्षाओं के लिए jQuery बहुविकल्पीय प्रश्न और उत्तर – Set 2 । उत्तर के साथ ये बहुविकल्पीय प्रश्न बोर्ड परीक्षाओं के साथ-साथ प्रतियोगी परीक्षाओं के लिए बहुत महत्वपूर्ण हैं। इस आर्टिकल में jQuery से संबंधित जानकारी को मुख्य रूप से प्रतियोगी और बोर्ड की परीक्षाओं के लिए बनाया गया है।
1. Which of the following jQuery method searches for descendent elements that match the specified selectors?
- locate( selector )
- find( selector)
- search( selector )
- None of the above.
Answer: find( selector)
2. Which of the following jQuery method prevents the browser from executing the default action?
- preventDefault( )
- stopImmediatePropagation( )
- stopPropagation( )
- None of the above.
Answer: preventDefault( )
3. Which of the following jQuery method gets the width property of an element?
- getCSSWidth( )
- getWidth( )
- width( )
- None of the above.
Answer: width( )
4. Which of the following jQuery method can be used to attach a function to be executed whenever an AJAX request fails?
- ajaxStart( callback )
- ajaxComplete( callback )
- ajaxSend( callback )
- ajaxError(callback)
Answer: ajaxError(callback)
5. Which of the following statements is correct?
- jQuery is a JavaScript library
- jQuery is a JSON library
- jQuery is an Angular library
- All the answers are true
Answer: jQuery is a JavaScript library
6. jQuery uses CSS selectors and XPath expressions to select items?
- True
- False
Answer: True
What does “min” mean in the following code snippet?
7. <script src = “jquery-1.5.2.min.js”> </script>
- Minimized version
- Miniature
- Minimized parameters
- Minimum value
Answer: Minimized version
8. What is the character does jQuery use as a shortcut for jQuery?
- %
- $
Answer: $
9. Which of the following jQuery method can be used to attach a function to be executed whenever an AJAX request is sent?
- ajaxStart( callback )
- ajaxComplete( callback )
- ajaxSend( callback )
- ajaxError(callback)
Answer: ajaxSend( callback )
10. Is JQuery a W3C standard?
- Yes
- No
Answer: No
11. Is jQuery a ___________?
- Client-side library
- Server-side library
Answer: Client-side library
12. $(“span”). What does it select?
- All span elements
- The first span element
Answer: All span elements
13. JQuery is a programming language?
- True
- False
Answer: False
14. JQuery code to set the background color of all “<span>” in blue?
- $(“span”).style(“background-color”, “blue”);
- $(“span”).css(“background-color”, “blue”);
- jQuery(“span”).style(“background-color”, “blue”);
- None of the above
Answer: $(“span”).css(“background-color”, “blue”);
15. Which of the following methods is used to hide selected items?
- visible(false)
- hidden()
- display(none)
- hide()
Answer: hide()
16. Which jQuery method to set one or more style properties for selected elements?
- css()
- html()
Answer: css()
17. Which of the following is an overloaded function?
- jQuery()
- $()
- script()
- jQuery() and $()
Answer: jQuery() and $()
18. Which of the following replaces $(document).ready(f)?
- jQuery(f)
- $(f)
- #(f)
- None of the above
Answer: $(f)
19. What are jQuery’s features?
- Useful collection of methods for manipulating selected items
- Efficient query method to find all document elements
- Syntax for referencing document elements
- All the answers are true
Answer: All the answers are true
20. $(“span.foo”). What does it select?
- All span elements with id = “foo”
- all span elements with class = “foo”
- The first span element with id = “foo”
- The first span element with class = “foo”
Answer: all span elements with class = “foo”
21. $(“span”). What does it select?
- All span elements
- The first span element
Answer: All span elements
22. $(“span.intro”). What does it select?
- The first span element with class=”intro”
- The first span element with id=”intro”
- All span elements with id=”intro”
- All span elements with class=”intro”
Answer: All span elements with class=”intro”
23. jQuery method to hide selected elements?
- visible(false)
- hidden()
- display(none)
- hide()
Answer: hide()
24. $(“div#id1 .cl1?). What does it select?
- The first element with id=”cl1? inside any div element with class=”id1?
- All elements with class=”cl1? inside the first div element with id=”id1?
- All div elements with id=”id1? or class=”cl1?
Answer: All elements with class=”cl1? inside the first div element with id=”id1?
25. Do you wonder why we do not have type=”text/javascript” inside the <script> tag?
- It is not required in HTML5
- It is required in HTML5
Answer: It is not required in HTML5
26. Which of the following is correct?
- jQuery is a JSON Library
- jQuery is a JavaScript Library
Answer: jQuery is a JSON Library
27. jQuery code to set the background color of all span elements to blue?
- $(“span”).style(“background-color”,”blue”);
- $(“span”).manipulate(“background-color”,”blue”);
- $(“span”).css(“background-color”,”blue”);
- $(“span”).layout(“background-color”,”blue”);
Answer: $(“span”).css(“background-color”,”blue”);
28. $(“span.intro”). What does it select?
- The first span element with class=”intro”
- The first span element with id=”intro”
- All span elements with id=”intro”
- All span elements with class=”intro”
Answer: All span elements with class=”intro”
29. Define single global function in the jQuery library?
- $()
- jQuery()
- Queryanalysis()
- None of the mentioned
Answer: jQuery()
30. $.foo() is parallel to
- javascript.foo()
- B.jQuery.foo()
- C.document.foo()
- D.None of the above
Answer: javascript.foo()