Question: JQUERY Showing Data I am trying to correct this code, this is what I need to do 1) Right now the code is selecting the

JQUERY Showing Data

I am trying to correct this code, this is what I need to do

1) Right now the code is selecting the 5 h2 elements, but I only need to access 3 of the h2 elements (only the ones with the question and answers to show and hide).

2) Right now the code I am having has fadeout effect, however I want to have a simple hide and show in JQUERY. I only want the answers to the question to be shown and hidden in a simple way

3) The idea is to use the toggleClass() method to add and remove the icon and to show and hide the information.

4) Also I dont want to use $("#loginDiv form").fadeToggle(1000);

jqueryshowingandhiding

/* The divs are hidden and the plus sign is shown when the page loads by setting the classes using jQuery When we toggle

a class, the original class remains, but the new class will be applied due to the CSS cascading order of precedence */

jQuery FAQs

Frequently Asked Questions

What is jQuery?

jQuery is a library of the JavaScript functions that you're most likely to need as you develop web sites.

Why is jQuery becoming so popular?

Three reasons:

  • It's free.
  • It lets you get more done in less time.
  • All of its functions are cross-browser compatible.

Which is harder to learn: jQuery or JavaScript?

For most functions, jQuery is significantly easier to learn and use than JavaScript. But remember that jQuery

is JavaScript.

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!