jQuery बहुविकल्पीय प्रश्न और उत्तर – Set 3:
प्रतियोगी परीक्षाओं के लिए jQuery बहुविकल्पीय प्रश्न और उत्तर – Set 3 । उत्तर के साथ ये बहुविकल्पीय प्रश्न बोर्ड परीक्षाओं के साथ-साथ प्रतियोगी परीक्षाओं के लिए बहुत महत्वपूर्ण हैं। इस आर्टिकल में jQuery से संबंधित जानकारी को मुख्य रूप से प्रतियोगी और बोर्ड की परीक्षाओं के लिए बनाया गया है।
1. Can you assign a anonymous function to a variable?
- True
- False
Answer: True
2. Which one of the four jQuery method set the value of an element?
- val( val )
- setContent( val )
- setValue( val )
- None of the above
Answer: val( val )
3. In which year jQuery was establish?
- 2001
- 2003
- 2006
- 2007
Answer: 2006
4. Who was invent the jQuery?
- John Richard
- John Resign
- Mark Bensman
- None of them
Answer: John Resign
5. Does the jQuery html() method works for both HTML and XML documents
- True
- False
Answer: False
6. Which one of the four jQuery method is used to set one or more style properties for selected elements?
- css()
- style()
- html()
- none of them
Answer: css()
7. jQuery uses CSS selectors and XPath expressions to select elements?
- True
- False
Answer: True
8. Can it possible to use jQuery together with AJAX?
- Yes
- No
Answer: Yes
9. Which jQuery method to hide selected elements?
- hidden()
- visible(false)
- display(none)
- hide()
Answer: hide()
10. Do you wonder why we don’t have type=”text/javascript” inside the <script> tag?
- It is required in HTML5
- It is not required in HTML5
- All of the above
- None of them
Answer: It is not required in HTML5
11. Which jQuery code to set the background color of all span elements to blue?
- $(“span”).css(“background-color”,”blue”);
- $(“span”).layout(“background-color”,”blue”);
- $(“span”).manipulate(“background-color”,”blue”);
- $(“span”).style(“background-color”,”blue”);
Answer: $(“span”).css(“background-color”,”blue”);
12. Which of the following jQuery method stops the rest of the event handlers from being executed?
- StopImmediatePropagation( )
- PreventDefault( )
- StopPropagation( )
- All of these
Answer: StopImmediatePropagation( )
13. Which one of the four jQuery method gets attributes of an element?
- remove( expr )
- delete( )
- empty( )
- None of them
Answer: remove( expr )
14. Which of the following jQuery method finds all sibling elements after the current element?
- GetNextAll( selector)
- LocateNextAll( selector )
- NextAll( selector )
- None of above
Answer: NextAll( selector )
15. The Query method used to perform an asynchronous HTTP request
- jQuery ajax() method
- jQuery ajaxSync() method
- jQuery ajaxSetup() method
- None of the above
Answer: jQuery ajax() method
16. Which of the following is correct about jQuery?
- JQuery is a fast and concise JavaScript Library created by John Resig in 2006 with a nice motto – Write less, do more.
- JQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
- JQuery is a JavaScript toolkit designed to simplify various tasks by writing less code.
- All of the Above
Answer: All of the Above
17. Which of the following jQuery method gets the direct parent of an element?
- Offset( selector)
- Parent( selector )
- OffsetParent( selector )
- None of the above
Answer: Parent( selector )
18. Which of the following is not the feature of jQuery?
- Useful set of methods for manipulating selected elements
- Expressive syntax for referring to elements in the document
- Efficient query method for finding the set of document elements
- Powerful functional programming techniques is not used for operating on sets of elements as a group
Answer: Powerful functional programming techniques is not used for operating on sets of elements as a group
19. Which of the following is a factory function?
- $()
- Onclick()
- JQuery()
- Queryanalysis()
Answer: JQuery()
20. Which property is used to obtain browser vendor and version information?
- Modal
- Version
- Browser
- Navigator
Answer: Navigator
21. Which of the following is the correct syntax of toggle() effects in JQuery?
- $(“button”).click(function(){ $(“p”).toggle(); });
- .(“p”).toggle();
- None of the above
Answer: $(“button”).click(function(){ $(“p”).toggle(); });
22. Which of the following is the correct syntax of nextUntil() method in JQuery?
- $(“h2”).nextUntiLAll(“h6”);
- $(“h2”).nextUn(“h6”);
- $(“h2”).nextUntil(“h6”);
Answer: $(“h2”).nextUntil(“h6”);
23. The siblings() method returns all sibling elements of the selected element. _________?
- Bookmark
- Report
- Discuss
- selected elements
- Siblings class
- None of the above
Answer: selected elements
24. JQuery parents() Method returns all ancestor elements of the ____________.?
- Bookmark
- Report
- Discuss
- class
- selected elements
- None of the above
Answer: selected elements
25. Which of the following ways is the correct Syntax of parent() method in JQuery ?
- $(“span”).child();
- $(“span”).parent();
- $(“span”).parentofchild();
- All of above
Answer: $(“span”).parent();
26. Given the following, what would $(‘.foo’).data(‘info’) return?<div id=’foo’ data-info=’google’ data-test=’bar’></div>
- bar
- div
- undefined
Answer: google
27. Which of these CSS selectors would select all of the <img> tags in a <div>
- img div
- img.div
- div img
- div.img
Answer: div img
28. Which of the following is selected by $(‘#bar’)?
- <div class=’bar’></div>
- <p data-bar=’bar’></p>
- <h1>bar</h1>
- <img id=’bar’></img>
Answer: <img id=’bar’></img>
29. The “#” is used to select an html element by its:
- class
- id
- name
- data attribute
Answer: id
30. The following is correct syntax for CSSp { color: red; }
- True
- False
Answer: True