टेलीग्राम पर हमसे जुड़ेंClick Here
दैनिक करेंट अफेयर्स प्राप्त करें Click Here

jQuery साक्षात्कार प्रश्न और उत्तर

jQuery साक्षात्कार प्रश्न और उत्तर:

प्रतियोगी परीक्षाओं के लिए jQuery साक्षात्कार प्रश्न और उत्तर। उत्तर के साथ ये प्रश्न बोर्ड परीक्षाओं के साथ-साथ प्रतियोगी परीक्षाओं के लिए बहुत महत्वपूर्ण हैं। इस आर्टिकल में jQuery से संबंधित जानकारी को मुख्य रूप से प्रतियोगी और बोर्ड की परीक्षाओं के लिए बनाया गया है।

1. When referencing an HTML element preceded by a # (pound or hash), what javascript function is this equivalent to?

  1. getElementByClassName
  2. getElementByTagName
  3. getElementById
  4. None of the above

Answer: getElementById

2 What is the each function used for?

  1. The Each function allows you to loop through different elements with a class or ID
  2. The Each function allows you to put the word “Each” into each element
  3. The Each function allows you to loop though every element in a parent element
  4. None of the above

Answer: The Each function allows you to loop through different elements with a class or ID

3. What are the various speed options?

  1. Only the words “slow”, “fast”, and “medium”
  2. The words “slow” and “fast” as well as integers for the milliseconds
  3. None of the above
  4. All of the above

Answer: The words “slow” and “fast” as well as integers for the milliseconds

4. If you want to stop your jQuery for a few milliseconds, which function do you use?

  1. delay()
  2. slowdown()
  3. pause()
  4. stop()

Answer: delay()

5. When do you use the $(this) code?

  1. When an HTML element will reference its parent element’s action
  2. When an HTML element will reference the entire document
  3. When an HTML element will reference its own action
  4. None of the above

Answer: When an HTML element will reference its own action

6. How do you fetch the first span on the page, which has the class ‘green’?

  1. $(‘span.green:first’)
  2. $(‘span, .green, :first’)
  3. $(‘first .green span’)
  4. None of the above

Answer: $(‘span.green:first’)

7. Which of the following is correct?

  1. jQuery is a JSON Library
  2. jQuery is a JavaScript Library
  3. None of the above
  4. All of the above

Answer: jQuery is a JavaScript Library

8. What is the difference between .width() and .outerWidth()?

  1. The methods are basically the same. The only difference is that .width() returns a number, whereas outerWidth() a string
  2. No difference. width() is a shorthand alias for outerWidth()
  3. width() returns the computed width of the element, while outerWidth() returns thewidth plus all the margins and paddings
  4. None of the above

Answer: width() returns the computed width of the element, while outerWidth() returns the width plus all the margins and paddings

9 Which function do you reference in HTML form data?

  1. val()
  2. formData()
  3. value()
  4. None of the above

Answer: val()

10. The speed options can be applied to which jQuery functions?

  1. show and fadeIn
  2. toggleCss
  3. css and ajax
  4. All of the above

Answer: show and fadeIn

11. You can test whether the browser supports specific features using…

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

Answer: $.support

12. Query.noConflict(true) is used to..

  1. Improve compatibility
  2. Remove all jQuery variables from the global scope
  3. Free up the $ symbol for use by other libraries
  4. All of the above

Answer: All of the above

13. The method that provides AJAX functionality within jQuery is named..

  1. easyAJAX
  2. jQueryajax
  3. ajax
  4. None Of The Above

Answer: ajax

14. You can attach a handler to an event using which method?

  1. bind
  2. eventAttach
  3. eventBind
  4. attach

Answer: bind

15. $(‘#masterList’).find(‘li’) .width(500).addClass(‘selected’); The phenomena occuring in the above code is called?

  1. Animating
  2. AJAX
  3. Event bubbling
  4. Chaining

Answer: Chaining

16. What is jQuery?

  1. jQuery is a library of JavaScript Functions
  2. jQuery stands for Structured Query Language
  3. jQuery stands for Cascading Style Sheets
  4. jQuery communication between computers on the Internet

Answer: jQuery is a library of JavaScript Functions

17. Load remote data using HTTP GET

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

Answer: $.get(url,data,callback,type)

18. When referencing an HTML element preceded by a . (dot), what javascript function is this equivalent to?

  1. getElementByTagName
  2. getElementByClassName
  3. getElementById
  4. None of the above

Answer: None of the above

19. Why do we usually add the stop() method before calling animate()?

  1. stop() ends any currently running animations on the element, and prevents conflicts and pile-ups
  2. We tell jQuery that the animation has to be stopped at some point
  3. stop() halts the execution of the scripts on the page until the animation has finished
  4. none of the above

Answer: stop() ends any currently running animations on the element, and prevents conflicts and pile-ups

20. With jQuery, look at the following selector: $(“div.intro”). What does it select?

  1. All div elements with class=”intro”
  2. The first div element with id=”intro”
  3. The first div element with class=”intro”
  4. All div elements with id=”intro”

Answer: All div elements with class=”intro”

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

  1. $(“p”).css(“background-color”,”red”);
  2. $(“p”).style(“background-color”,”red”);
  3. $(“p”).layout(“background-color”,”red”);
  4. $(“p”).manipulate(“background-color”,”red”);
  5. Answer: $(“p”).css(“background-color”,”red”);

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

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

Answer: hide()

23. Which statement is true?

  1. To use jQuery, you can refer to a hosted jQuery library at Google
  2. To use jQuery, you must buy the jQuery library at www.jquery.com
  3. To use jQuery, you do not have to do anything. Most browsers (Internet Explorer, Chrome, Firefox and Opera) have the jQuery library built in the browser
  4. None of the above

Answer: To use jQuery, you must buy the jQuery library at www.jquery.com

24. Which jQuery method should be used to deal with name conflicts?

  1. conflict()
  2. noConflict()
  3. nameConflict()
  4. noNameConflict()

Answer: conflict()

25. Which jQuery method is used to switch between adding/removing one or more classes

(for CSS) from selected elements?

  1. switchClass()
  2. switch()
  3. toggleClass()
  4. None of the above

Answer: switchClass()

26. Which statement best explains what “unobtrusive JavaScript” is?

  1. JavaScript that is separate from HTML
  2. JavaScript that doesn’t annoy users
  3. JavaScript that works even with scripting turned off
  4. JavaScript that does not affect a web page
  5. Answer: JavaScript that is separate from HTML

27. Which of these is NOT a valid comment in JavaScript?

  1. /* This is a comment
  2. /* This is a comment. */
  3. // This is a comment
  4. All of the above

Answer: // This is a comment

28. In JavaScript, we can keep a reference to the context outside a function by assigning it to a variable: var self = this. In CoffeeScript, we use:

  1. printScope => console.log this
  2. B self = this printScope -> console.log self
  3. printScope => console.log @
  4. All of the above

Answer: All of the above

29. What is the correct JavaScript syntax to write “Hello World”?

  1. document.write(“Hello World”)
  2. response.write(“Hello World”)
  3. (“Hello World”)
  4. None of the above

Answer: document.write(“Hello World”)

30. jQuery is a…

  1. Ruby Gem
  2. PHP Frameworks
  3. JavaScript library
  4. None of the above

Answer: JavaScript library

Leave a Comment