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 6120581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:41:04+00:00 2026-05-23T15:41:04+00:00

I had a web page that I thought had way too much content showing

  • 0

I had a web page that I thought had way too much content showing at one time, so I wrote some JavaScript to hide a bunch of images until they were needed. At the bottom of said page I have a link that says, “Click here for Screen Shots!” When clicked the JS will display a previously hidden span that contains all the screenshots. The link text is changed to, “Click here to hide Screen shots.” This works in IE and Firefox, but for some reason not in Chrome (in chrome I have to click the hide link 3 times before the span is hidden again). The code is fairly simple, but I cant figure out what is wrong with it. Any ideas?

The JS:

$('#show').click(function(){
$('#Screenies').show('slow');
$('#show').hide();
$('#hide').show();
});

$('#hide').click(function(){
$('#Screenies').hide('slow');
$('#hide').hide();
$('#show').show();
});

The Html:

 <p id="show" style="cursor:pointer; color:Navy"><u>Click here for sceenshots!</u></p>
 <p id="hide" style="cursor:pointer; color:Navy"><u>Hide sceenshots</u></p>
 <span id="Screenies">
      [Image links in here]
 </span>

Edit:
Forgot to mention I am using Jquery 1.6

  • 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-23T15:41:05+00:00Added an answer on May 23, 2026 at 3:41 pm

    This has to do with the fact that you are animating a span element – don’t ask me why. But if you are using semantic markup you should really be using a div to hold your images. I re-factored your code as well, so now you need only 1 link.

    $('#show').toggle(function(){
        $('#Screenies').show('slow');
        $('#show').text('Hide');
    }, function(){
        $('#Screenies').hide('slow');
        $('#show').text('Show');
    });
    

    If you don’t know about the jQuery toggle function read this article, the rest of the code simply animates the element in and then changes the link text based on the current state.

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

Sidebar

Related Questions

I once found a web site that had some 'Requires .net 1.0', 'Requires .net
We have had in Domino for some time Web Services. Now, after the release
I'm trying to add a jQuery post to some JavaScript on a web page.
First I thought that I had to convert JavaScript to PHP, but then I
I had this error when I browse new web site that site sub from
Has anyone had any experience writing a web control (in either ASP.net, or javascript/HTML/CSS),
Currently, I have an asp.net web application that links to another page. The enduser
Note: NOT Javascript. :-) Hello, I just had a random thought, and have decided
I'm not a bad web developer but it happens that I've never had to
Basically I have a web site that renders HTML preview of some documents (mainly

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.