jQuery Flashcards
in jquery how can you bind events to a click event
.click()
in jquery, the click event handler will only be called when what 2 requirements are met
- The mouse button is depressed while the pointer is inside the element.
- The mouse button is released while the pointer is inside the element.
in jquery how can you get/set css properties
.css()
in jquery how can you remove a class
.removeClass()
in jquery how can you select siblings (excluding the selection of the node it is called on
.siblings()
in jquery how can you add a class
.addClass()
in jquery, how can you swap whether an element is shown or hidden
.toggle()
in jquery what is the short hand for grabbing an element by tag name
$(“tag”)[index]; i.e. $(“canvas”)[0] grabs first canvas tag
in jquery, issue a ajax get request, check if it succesfully handled and failed using a callback
$.ajax(“google.com”)
.done(function(data){console.log(data);})
.fail(function(xhr){console.log(“error occured”, xhr.responeText)};