• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 42
  • Last Modified:

hide/show upon clicks

I have this code:

$('#call').click(function() {
    $('.check_all_hide_call').show();
    $('.check_all_call').hide();

});

Open in new window


How can I say that if I click it again, for it do the the opposite hide/show
0
Jazzy 1012
Asked:
Jazzy 1012
1 Solution
 
leakim971PluritechnicianCommented:
$('#call').click(function() {
    // https://api.jquery.com/multiple-selector/
    // https://api.jquery.com/toggle/
    $('.check_all_hide_call,.check_all_call').toggle();
});

Open in new window

1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now