True
What symbol do we use as a shortcut for jQuery
'$'
What method do you use to set a background colour of an element
.css()
What function hides a currently shown element on the page
.hide()
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
Which of the jQuery selector selects elements whose css class is 'my-class'
.my-class
What language is jQuery written in?
Which jQuery function is used to prevent code from running, before the document is finished loading?
$(document).ready() or $(document).on('ready', ...)
.stop()
In a standard unordered list, $("li").parent(); would return what element?
'ul'
What would the selector $('div') return?
All the div elements in the DOM
True/False; jQuery cannot navigate the DOM
false
What jQuery property can be used to find the number of elements returned in a selection?
.length
When working with the event object, what method prevents the browser from preforming its normal event operation?
event.preventDefault()
What attribute can we use in script tags to prevent cross site scripting attacks when including scripts like jQuery?
integrity
What would the selector $('p#sidebar') return?
A paragraph element with the id 'sidebar'
The term for combining actions and methods together in jQuery is called...?
Chaining
How can you get href value from the following;
<a id="myLink" href="http://www.durhamcollege.ca">click me</a>
$("#myLink").attr("href")
event.target
What method would you use to extract just the text from a method, without any markup or html around it
.text()
What would the resulting nodelist from $('div').add('p')
hold
All div and paragraph elements
What library can be included with jQuery to simplify animations and UI code?
jQuery UI
What methods inserts content at the beginning of selected elements?
.prepend()
When jQuery animates elements, what attribute does jQuery modify?
inline sytle attribute
True/Flase; $("li:gt(0)") is equivilant to .slice()
True