About JQuery

Following are some of the multiple choice questions on the JQuery with answers that will help the students in developing their knowledge.

JQuery MCQ

1. Which sign does jquery use as a shortcut for jquery?

  • ( # ) sign
  • ( & ) sign
  • ( $ ) sign
  • ( * ) sign

2. The hover() method takes two functions and is a combination of the ______?

  • mouseclick() methods.
  • mouseenter() and mouseleave() methods.
  • None of the above
  • All of above

3. JQuery provides a variety of methods that allow us to traverse the DOM.?

  • True
  • False

4. Which of the following is the correct syntax of Stop() in JQuery?

  • $(selector).stop(stopAll,goToEnd);
  • flex-wrap: no-wrap;
  • Both A & B
  • None of these

5. Which of the following ways is correct JQuery Event Syntax ?

  • $("p").click(function(){ // action goes here!! });
  • $("p").openALl(function(){}
  • Both A & B
  • None of these

6. Which of the following is the correct form to create to hide elements in Jquery and select the element?

  • $(document).ready(function(){ $("button").click(function(){ $("p").hide(); });});
  • flex-wrap: no-wrap;
  • None of the above

7. Which of the following ways is correct JQuery Hide() Syntax ?

  • $.Hide()
  • $("#hide").click(function(){ $("p").hide(); });
  • Both A & B
  • None of these

8. The last() method returns the last element of the ____________.?

  • last elements
  • specified elements
  • None of the above
  • All of above

9. AddClass() - Adds one or more classes to the____________.?

  • selected classes.
  • selected elements
  • None of the above
  • None of these

10. RemoveClass() - Removes one or more classes from the _________?

  • removeclass
  • selected elements
  • Both A & B
  • None of these

11. The jQuery animate() method is used to create custom animations.?

  • True
  • False

12. Which of the following ways is correct Syntax of Jquery animate() ?

  • $(selector).animate({params},speed,callback);
  • $(selector).fadein(speed,callback);
  • $(selector).animate(speed,callback);
  • All of above

13. It is also possible to define relative values ______?

  • The Text is shown normal.
  • (the value is then relative to the element's current value)
  • The value is then relative
  • None of these

14. How do you assign a variable that calls a function with a.run();

  • var a = var run: function() { };
  • var a = run: function() { };
  • var a = run = function() { };
  • var a = { run: function() { } };

15. Which sign does it use as a shortcut for Modulus in JS?

  • =
  • /
  • %
  • $

16. Profile cards are like photos with captions of.

  • msg
  • Variable lengths
  • None of the above
  • None of these

17. How to Write Jquery Comments?

  • <!--this is a comment -->.
  • <-- this is a comment -->
  • // this is a comment //
  • None of these

18. Which of the following ways is the correct Syntax of the .focusout() method in JQuery ?

  • $("div").focusout();
  • $("div").fade();
  • Both A & B
  • None of these

19. What is .blur() method?

  • The Text is shown blur
  • Bind an event handler to the “blur” JavaScript event, or trigger that event on an element.
  • None of the above
  • All of above

20. Which of the following is the correct syntax of .select() method in JQuery?

  • $("p").select(.intro());
  • $("p").select.intro();
  • $("p").select(".intro");
  • None of these

21. JQuery selectors allow you to select and manipulate ______?

  • The Text is shown normal.
  • HTML element(s).

22. Look at the following selector: $ ("p # intro"). What do you select?

  • remove()
  • detach()
  • Ambos métodos pueden ser utilizados
  • None of these

23. What is the correct way to call the jquery library in HTML?

  • <script type="text/javascript" src="jquery-3.4.1.min.js"></script>
  • <link rel="stylesheet" type="text/css" href="jquery-3.4.1.min.js">

24. What scripting language is jQuery written in?

  • VBScript
  • JavaScript
  • C++
  • C#

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

  • $ ("p"). manipulate ("color de fondo", "rojo");
  • $ ("p"). style ("color de fondo", "rojo");
  • $ ("p"). css ("color de fondo", "rojo");
  • $ ("p"). layout ("color de fondo", "rojo");

26. Mire el siguiente selector: $ ("div"). ¿Qué selecciona?

  • El primer elemento div
  • Todos los elementos div

27. El selector this Permite:

  • Permite seleccionar al elemento que activó el evento.
  • Permite, ayudar para programar de forma más sencilla con Javascript
  • Ninguno
  • None of these

28. Mire el siguiente selector: $ ("p # intro"). ¿Qué selecciona?

  • El elemento p con id="introduccion"
  • Todos los elementos con p con class="intro"

29. ¿Qué signo usa jQuery como acceso directo para jQuery?

  • el signo $
  • la señal
  • el ? Firmar
  • Both A & B

30. ¿Jquery es?

  • Es un Editor de Texto
  • Es una biblioteca de Javascript que simplifica la interacción con documentos HTML.
  • Es un framework CSS y Javascript
  • Es un software de código abierto deliberado por TWITTER

31. ¿Que efecto de Jquery muestra un elemento?

  • .show();
  • .hide();
  • .fadeIn();
  • .slideUp();

32. En los eventos .click() ¿se utiliza para hacer click al elemento?

  • Falso
  • Verdad

33. ¿Que efecto de Jquery oculta un elemento?

  • .efecto();
  • .hide();
  • .fadeIn();
  • .slideUp();

34. $(document).ready(function(){ ..}

  • Sirve para seleccionar todas las etiquetas del documento JQuery
  • Sirve para hacer cosas cuando la página está lista para recibir instrucciones JQuery
  • Sirve en JQuery para mostrar un mensaje de alerta informando al usuario
  • Ninguno

35. El Método jQuery css ()

  • Elimina elementos HTML existentes.
  • Agrega un elemento al inicio del elemento contenedor
  • Establece o devuelve una o más propiedades de estilo para los elementos seleccionados
  • None of these

36. Var nombre=$('#nombre').val();

  • Obtiene el valor del input del formulario
  • Obtiene el valor del textarea del formulario
  • Obtiene el valor del boton del formulario
  • Ninguno

37. $("p").css("background-color", "blue");

  • Sets a background color style.
  • It will set the background color value for ALL matching elements e.g.
  • Set a blue color background
  • None of these

38. Which of the following is selected by $('.foo')?

  • <p>Foo</p>
  • <img id='foo'></img>
  • <div class='foo'></div>
  • <foo></foo>

39. CSS stands for

  • Cascading Style Sheets
  • Creative Style Settings
  • Compact Software Settings
  • Creative Setting Selectors

40. When would the following code be run$(function() {});

  • When the user requests the page
  • When the user pushes a button
  • After all the elements are loaded
  • Never

41. The following is correct syntax for CSSp { color: red; }

  • True
  • False

42. The "#" is used to select an html element by its:

  • class
  • id
  • name
  • data attribute

43. Which of the following is selected by $('#bar')?

  • <div class='bar'></div>
  • <p data-bar='bar'></p>
  • <h1>bar</h1>
  • <img id='bar'></img>

44. Which of these CSS selectors would select all of the <img> tags in a <div>

  • img div
  • img.div
  • div img
  • div.img

45. Given the following, what would $('.foo').data('info') return?<div id='foo' data-info='google' data-test='bar'></div>

  • google
  • bar
  • div
  • undefined

46. Which of the following ways is the correct Syntax of parent() method in JQuery ?

  • $("span").child();
  • $("span").parent();
  • $("span").parentofchild();
  • All of above

47. JQuery parents() Method returns all ancestor elements of the ____________.?

  • class
  • selected elements
  • None of the above

48. The siblings() method returns all sibling elements of the selected element. _________?

  • selected elements
  • Siblings class
  • None of the above

49. Which of the following is the correct syntax of nextUntil() method in JQuery?

  • $("h2").nextUntiLAll("h6");
  • $("h2").nextUn("h6");
  • $("h2").nextUntil("h6");

50. Which of the following is the correct syntax of toggle() effects in JQuery?

  • $("button").click(function(){ $("p").toggle(); });
  • .("p").toggle();
  • None of the above

Enjoyed the Quiz. Share this with friends

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.