Question: 1. What will this jQuery selector return? $('#bestIdEver').parent(); a. The selector traverses a single level up the DOM tree and returns the parent element to

1. What will this jQuery selector return?

$('#bestIdEver').parent();

a. The selector traverses a single level up the DOM tree and returns the parent element to #bestIdEver
b. The selector traverses all levels up the DOM tree and returns all ancestor elements to #bestIdEver
c. The selector traverses a single level down the DOM tree and returns the parent element to #bestIdEver
d. The selector traverses to the top of the DOM tree and returns the root element

2. Which selector should you use to get all elements that have been assigned the role banner?

a. $(role: [banner])
b. $('{role=banner}')
c. $('[role=banner]')
d. $(#banner)

3. There is a technique in jQuery that allows you to combine several method calls to one selector, like this:

var $grid = $('#bab_grid'); var $lists = $grid .find('li') .css('background', '#600') .animate(-=100, 2000) .fadeout() .fadeIn('slow');

a. distributing

b. chaining

c. linking

4. What is this statement an example of?

var $ghost = $img.clone().appendTo($link).addClass('ghost');

a. jQuery inheritance
b. jQuery chaining
c. JavaScript querying

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!