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

  • SEARCH
  • Home
  • 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 3599126
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:19:44+00:00 2026-05-18T20:19:44+00:00

This is written in an external .js with jquery… I have two windows that

  • 0

This is written in an external .js with jquery…

I have two windows that slide in and out of view like:

$(document).ready(function() {
  // hides gallery1 as soon as the DOM is ready  
  $('#gallery1').hide();  
  // shows the menu on click   
  $('#showgal1').click(function() {  
    $('#gallery1').delay(490).show('slide', {direction:'left'});
    $('#gallery2').hide('slide', {direction:'right'});
    //need code to disable showgal1 and enable showgal2
  });
  $('#showgal2').click(function() {  
    $('#gallery2').delay(490).show('slide', {direction:'right'});
    $('#gallery1').hide('slide', {direction:'left'});
    //need code to disable showgal2 and enable showgal1
  });
});

‘gallery1’ and ‘gallery2’ are DIV’s with flash image galleries and ‘showgal1’ and ‘showgal2’ are id’s of anchors…

looks like

<a href="#" id="showgal1">gallery 1</a>

I cannot find a way to disable the .click function when one is clicked and re-enable the other…

i want to disable ‘showgal1’ by default and when ‘showgal2’ event takes place it removes the attribute and makes ‘showgal2’ disabled until ‘showgal1’ is clicked…

the .attr('disabled','disabled') hasn’t worked yet…

  • 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-18T20:19:45+00:00Added an answer on May 18, 2026 at 8:19 pm

    So you want to stop any action when a showgal is clicked if the associated gallery is already visible?

    $('#showgal1').click(function(){
        if($('#gallery1').is(":visible"))
           return false;
    
        $('#gallery1').delay(490).show('slide', {direction:'right'});
        $('#gallery2').hide('slide', {direction:'left'});
    
    });
    
    $('#showgal2').click(function(){
        if($('#gallery2').is(":visible"))
           return false;
        $('#gallery2').delay(490).show('slide', {direction:'right'});
        $('#gallery1').hide('slide', {direction:'left'});
    
    });
    

    The first 2 lines of each click function will stop the function if the respective gallery is already visible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is written in an external .js with jquery... I have two windows that
I have written an external script that needs to run after DOM is ready
I have written a Windows service that spawns a separate process. This process creates
This is the basis of how my document is written out. I have an
I have some content (some from an external source, some specially written) that is
Here is what I have: An external DLL, I have written in C. This
I have this servlet program and an external .jar file (written by someone else)
I've written this piece of code where I've assigned an unsigned integer to two
I have written this clone method for when the parent of the Employee class
I have written this program, which sorts some ints using a functor: #include<iostream> #include<list>

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.