wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

jQuery fade slide hide

Total questions: 27

Worksheet time: 14mins

Name
Class
Date
1.

With jQuery you can fade an element in and out of visibility.?

a)

True

b)

false

2.

Which of the following ways is correct Syntax of Jquery fadeIn() ?

a)

$(selector).fadein(speed,callback);

b)

$(selector).fadeIn(speed,callback);

c)

None of the above

3.

The jQuery fadeOut() method is used to fade out a visible ____________.?

a)

object

b)

Element

c)

None of the above

4.

The jQuery fadeToggle() method toggles between the______?

a)

fadeIn() and fadeOut() methods.

b)

The Text is shown normal.

c)

None of the above

5.

Which of the following is the correct syntax of fadeToggle() effects in JQuery?

a)

$(selector).fadeToggle(speed,callback);

b)

flex-wrap: no-wrap;

c)

None of the above

6.

In order to make use of jQuery in our HTML page, which of the following lines of code must be put in our page?

a)

<link rel="stylesheet" href="styles/style_anchor.css" type="text/css" />

b)

<meta name="viewport" content="width=device-width, initial-scale=1">

c)

<script src="script/jquery-3.6.0.js"></script>

d)

<script src="script/jquery.slider.min.js"></script>

7.

Which of the following lines of code will allow your jQuery code to be succcessfully run?

a)

<script src="script/jquery-slider-theme.js"></script>

<script src="script/jquery.slider.min.js"></script>

b)

<script src="script/jquery-3.6.0.js"></script>

<script src="script/jquery-slider-theme.js"></script>

c)

<script src="script/jquery-slider-theme.js"></script>

<script src="script/jquery-3.6.0.js"></script>

8.

Which of the following is the selector for an element whose ID is "MyID"?

a)

$("#MyID")

b)

$("MyID")

c)

$("#MYID")

d)

$(".MyID")

9.

What goes into A and B?


#(A).B()

a)

A = selector

B = value

b)

A = ID

B = action

c)

A = selector

B = action

d)

A = ID

B = value

10.

What is the purpose of the following?


$(document).ready( function() { … } );

a)

It executes the code inside when the function is called

b)

It executes the code inside before any other code

c)

It executes the code inside when the document is ready

11.

Which one of the following code will cause the image do animations in this order:


1. fade out

2. fade in

3. be hidden


<img class="myImage" src="myImage.jpg"/>

a)

$(".myImage").hide().fadeIn().fadeOut();

b)

$(".myImage").fadeOut().fadeIn().hide();

c)

$(".myImage").fadeOut();

$(".myImage").fadeIn();

$(".myImage").hide();

d)

$("#myImage").fadeOut().fadeIn().hide();

12.

With jQuery, you can hide and show HTML elements with the hide() and show() methods?

a)

True

b)

False

13.

Which of the following ways is correct JQuery Hide() Syntax ?

a)

$.Hide()

b)

$("#hide").click(function(){

$("p").hide(); });

c)

None of the above

14.

The optional callback parameter is a function to be executed after the hide() or show() ____________.?

a)

Normal

b)

method completes

c)

None of the above

15.

You can also toggle between hiding and showing an element with the ______?

a)

Animation

b)

Picture

c)

toggle() method

16.

Which of the following is the correct syntax of toggle() effects in JQuery?

a)

$("button").click(function(){

$("p").toggle(); });

b)

.("p").toggle();

c)

None of the above

17.

It is a fast, small and feature-rich JavaScript library included in a single .js file.

(a)  

18.

These can be apply to DOM elements like show or hide elements, fade-in or fade-out of visibility, sliding effect, animation etc

(a)  

19.

It is an alias of jQuery function.

(a)  

20.

$(".example").toggle(300);


What does this jQuery function do?

a)

Toggle a function in 300 seconds

b)

Toggle visibility in 300 seconds

c)

Toggle function in 300 milliseconds

d)

Toggle visibility in 300 milliseconds

e)

Toggle function in 300 hours

21.

With jQuery you can create a sliding effect on elements.?

a)

True

b)

False

22.

Which of the following ways is the correct Syntax of Jquery SlideDown() ?

a)

$(selector).fadein(speed,callback);

b)

$(selector).slideDown(speed,callback);

c)

None of the above

23.

The jQuery slideUp() method is used to slide up an.____________.?

a)

area

b)

element

c)

None of the above

24.

The jQuery slideToggle() method toggles between the slideDown() and slideUp() methods.If the elements have been slide down, slideToggle() ______?

a)

will slide them up

b)

will toggle the area

c)

None of the above

25.

Which of the following is the correct syntax of SlideToggle() effects in JQuery?

a)

$(selector).slideToggle(speed,callback);

b)

flex-wrap: no-wrap

c)

None of the above

26.

jQuery is a programming language

a)

True

b)

False

27.

How would you set the href to an <a> element using jQuery?

a)

$('a').href('https://generalassemb.ly/);

b)

$('a').attr('href', 'https://generalassemb.ly/');

c)

$('a').url('https://generalassemb.ly/');

d)

$('a').link('https://generalassemb.ly/');