Here is the list of most commonly used jQuery API functions:
- find(): Selects elements based on the provided selector string
- hide(): Hides an element if it was visible
- show(): Shows an element if it was hidden
- html(): Gets or sets an inner HTML of an element
- append() Injects an element into the DOM after the selected element
- prepend() Injects an element into the DOM before the selected element
- on(): Attaches an event listener to an element
- off() Detaches an event listener from an element
- css(): Gets or sets the style attribute value of an element
- attr() Gets or sets any attribute of an element
- val(): Gets or sets the value attribute of an element
- text(): Gets the combined text of an element and its children
- each(): Iterates over a set of matched elements
// Gets or Sets the value of the attribute. e.x$("input[type='checkbox'].prop("checked"); It returns false or true. To set a value: $ ("input[type='checkbox'].prop("checked", false);
.prop()
Also,
is();
//It's similar to .prop(), but only get's the value, true or false of an attribute in an element. e.x $("input[type='checkbox'].is(":checked");
A semicolon must be inserted too.