JQuery Flashcards
what is the result?
(true + false) > 2 + true
false because true = 1 false = 0 (1+0) = 1 1 is not greater than 2 so (true + false) > 2 is false when we have false and true together we get false.
why would we use jQuery and what is it?
Write Less, Do More, and it is a Javascript Library.
what are the cons of JQuery?
Hard to use with OOP. they support plugins that have not been verified. and they are a library
what is the syntax to ensure JQuery is running
$(document).ready(function());
how to create a div tag with JQuery
$(“<div></div>”);
how to select a tag in JQuery?
$(“div”);
how to select an id in JQuery?
$(“#idName”);
how to select a class in JQuery?
$(“.className”);
perform a hide action on all p tags using JQuery
$(“p”).hide();
how to remove class from a paragraph
$(“p”).removeClass(“cat”);
how to add text to a paragraph?
$(“p”).text(“heeelllooo”);
how to wrap an element
$(“p”).wrap(“<a></a>”);