Section 16/17 - jQuery Flashcards
1
Q
Access jQuery element value
A
.val()
2
Q
Access jQuery element attribute
A
.attr()
3
Q
Access jQuery element text
A
.text()
4
Q
Access jQuery element html
A
.html()
5
Q
Add class to jQuery element
A
.addClass()
6
Q
Remove class from jQuery element
A
.removeClass()
7
Q
For jQuery element, add class if not there or remove if there
A
.toggleClass()
8
Q
Delete element from dom using jquery
A
$(…).remove()