Slick Selectors
Generic jQuery
Many Methods
Eventful Animation
Crazy Code
100
True/False; Jquery uses CSS style selectors to select elements

True

100

What symbol do we use as a shortcut for jQuery

'$'

100

What method do you use to set a background colour of an element

.css()

100

What function hides a currently shown element on the page

.hide()

100

True/False; The following line of code would add the new <li> element to an unordered list?

$("ul").after("<li>Bananas</li>");

False, it would add it after the list

200

Which of the jQuery selector selects elements whose css class is 'my-class'

.my-class

200

What language is jQuery written in?

Javascript
200

Which jQuery function is used to prevent code from running, before the document is finished loading?

$(document).ready() or $(document).on('ready', ...)

200
When an animation is in progress, what method can we use to stop/pause the animation

.stop()

200

In a standard unordered list, $("li").parent(); would return what element?

'ul'

300

What would the selector $('div') return?

All the div elements in the DOM

300

True/False; jQuery cannot navigate the DOM

false

300

What jQuery property can be used to find the number of elements returned in a selection?

.length

300

When working with the event object, what method prevents the browser from preforming its normal event operation?

event.preventDefault()

300

What attribute can we use in script tags to prevent cross site scripting attacks when including scripts like jQuery?

integrity

400

What would the selector $('p#sidebar') return?

A paragraph element with the id 'sidebar'

400

The term for combining actions and methods together in jQuery is called...?

Chaining

400

How can you get href value from the following;

<a id="myLink" href="http://www.durhamcollege.ca">click me</a>

$("#myLink").attr("href")

400
In the event object, how would you access the object that triggered the event?

event.target

400

What method would you use to extract just the text from a method, without any markup or html around it

.text()

500

What would the resulting nodelist from $('div').add('p')

hold

All div and paragraph elements

500

What library can be included with jQuery to simplify animations and UI code?

jQuery UI

500

What methods inserts content at the beginning of selected elements?

.prepend()

500

When jQuery animates elements, what attribute does jQuery modify?

inline sytle attribute

500

True/Flase; $("li:gt(0)") is equivilant to .slice()

True