Which line of code should you use?

You are creating a page that contains detailed employee information for a company portal.
The page uses a jQuery library. The page contains a hidden button named btnEdit that is
defined by the following code.
<button id=”btnEdit” style=”display: none;n>Edit</button>
The button is not displayed by default.
The button must be displayed only if the user is logged on.
You need to add code to the document.ready() function to meet the requirements for the
button.
Which line of code should you use?

You are creating a page that contains detailed employee information for a company portal.
The page uses a jQuery library. The page contains a hidden button named btnEdit that is
defined by the following code.
<button id=”btnEdit” style=”display: none;n>Edit</button>
The button is not displayed by default.
The button must be displayed only if the user is logged on.
You need to add code to the document.ready() function to meet the requirements for the
button.
Which line of code should you use?

A.
$ (‘#btnEdit’).appear ();

B.
$ (‘#btnEdit’).visible = true;

C.
$ (‘#btnEdit’).show();

D.
$ (‘#btnEdit’).Visible();



Leave a Reply 5

Your email address will not be published. Required fields are marked *


Enrique

Enrique

Answer is C.

freedeveloper

freedeveloper

Agree is C
From : http://api.jquery.com/show/

.show()
Description: Display the matched elements.

Aires

Aires

Correct, i tested the code, and option C is indeed correct. The function appear() doesn’t even exist in the jquerry library, and the remaining options B and D doesn’t work either.

Marcelo I Machado Jr

Marcelo I Machado Jr

The correct answer is C.