Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

NAME: CARAS, DONNA MHAE T.

SUBJECT: IPT
SECTION/YEAR: BSIT-3D SIR: ESCALANTE, MARK

1. What is jQuery?

jQuery is a JavaScript framework designed to simplify HTML DOM tree traversal and
manipulation, as well as event handling, CSS animation, and Ajax. It is free, open-source
software using the permissive MIT License. 

2. What are the different selectors in jQuery?

jQuery selectors are used to "find" (or select) HTML elements based on their name, id,
classes, types, attributes, values of attributes and much more.

3. Differentiate Get and Set attributes

Element.setAttribute() Sets the value of an attribute on the specified element. If the


attribute already exists, the value is updated; otherwise a new attribute is added with the
specified name and value. To get the current value of an attribute, use get Attribute() ; to
remove an attribute, call removeAttribute() .

4. How to remove attributes in jQuery?

The removeAttr() method is an inbuilt method in jQuery which is used to remove one or
more attributes from the selected elements. Remove the style attribute from all <p>
elements:

$("button").click(function(){
$("p").removeAttr("style");
});

5. What is val() method/function? T he val() method returns or sets the value attribute of the
selected elements. When used to return value: This method returns the value of the value
attribute of the FIRST matched element.

You might also like