Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 630833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:53:56+00:00 2026-05-13T19:53:56+00:00

I am just starting to use jQuery, I need to do something that I

  • 0

I am just starting to use jQuery, I need to do something that I am not sure is possible.
I know to use if statements on jQuery is like normal JavaScript but I don’t know how to use the jQuery selectors on a normal if statement.

The function its currently working, but I am having two problems which I don’t know how to fix, (I would assume that it would be with a if statement, but don’t know how).

One problem is that, on container1 this function should not be applied, only with the two images, maximize and minimize should I be able to show and hide this.

Second problem is that the images are meant to show (when maximize is clicked) and hide (when minimize is clicked) the container below, but the function I have conflict with the maximize and minimize functions (which are normal JavaScript and I would like to make the jQuery).

I hope its well explained. Please let me know if you have any questions.

The code would be the following.

   <html>
    <head>
            <script type="text/javascript">
     $(document).ready(function(){
      $(".Header").click(function(){
      $(this).next(" .container").slideToggle("fast");
      });
       });
             </script>
    </head>
    <body>
     <table class="Header">
      <tr>
       <td>header1</td>
       <td><img alt="minimize" onclick="function to minimise container1"/>
        <img alt="maximize" onclick="function to maximize container1" /></td>
      </tr>
     <table>
     <div class="container>**Container1**</div>
     <table class="Header">
      <tr>
       <td>**header2**</td>
       <td><img alt="minimize" onclick="function to minimise container2"/>
       <img alt="maximize" onclick="function to maximize container2" /></td>
      </tr>
     <table>
     <div class="container>**Container2**</div>
     <table class="Header">
      <tr>
       <td>**header3**</td>
       <td><img alt="minimize" onclick="function to minimise container3"/>
       <img alt="maximize" onclick="function to maximize container3" /></td>
      </tr>
     <table>
     <div class="container>**Container3**</div>
    </body>
   </html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:53:56+00:00Added an answer on May 13, 2026 at 7:53 pm

    How about this:

    $(function() {
        $(".Header:not(#Container1)").click(function(){
            var c = $(this).next(".container");
            c.slideToggle("fast");
        });
        $(".Header:not(#Container1)").toggle(
            function(){ $(this).next(".container").next("img").css('display', 'block'); },
            function(){ $(this).next(".container").next("img").css('display', 'none'); }
        );
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone done something like this? How? I'm just starting a project that will
I'm just starting to use the jQuery framework. I really like the look of
So, I am just starting to use jQuery with one of my Django projects,
I'm just starting to use the JQuery library so bear with me if I
I learned from this article that to avoid confliction between javascript libraries, use jQuery.noConflict();
I am just starting out with JQuery and Javascript, and adapting a nested set
I am just starting to use Subversion with Tortoise SVN client for one of
I'm just starting to use Django for a personal project. What are the pros
I've done some Python but have just now starting to use Ruby I could
When starting out with a new application, would you rather just use an existing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.