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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:08:45+00:00 2026-06-09T03:08:45+00:00

I am working on a gallery at http://icon.stornge.com , where the intended functionality is

  • 0

I am working on a gallery at http://icon.stornge.com, where the intended functionality is for the user to click on a link on the homepage, then have a first image display, then if/when the user clicks on the image, the next limit loads, and so on until the last image.

What is happening instead is that the first click loads the image, first a sliver and then the full image (is this the intended behavior of jQuery.load('slow') on an image?</a>), and then clicking on the first image appears to call the event handler (if I put an alert() it displays as expected), but the first image stays in its place, and the second image does not appear. Chrome’s console does not register any JavaScript errors.

Are there interactions between jQuery’s event handling and .hide() and .show()? Am I getting in trouble by having an initial CSS “display: none” or anything else?

What should I change so that clicking on one image loads the next?

  • 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-06-09T03:08:47+00:00Added an answer on June 9, 2026 at 3:08 am

    First, though it works (surprisingly — but, maybe only in Chrome) the protocol should be all lowercase (javascript:, not JavaScript:). Second, any href using script, which does not return false (after all script code in the href), can cause problems.

    Anyway, just use the following:

    1- Apply a class (ex. “image-toggle”) to the the images and links which you want to trigger an image to appear. Add class “icon” to the anchor.

    2- Change the current href to # or javascript:return false;

    3- Remove the IDs from the images (W3C HTML specs clearly state that ID values must begin with an alpha character; you can use numbers — but, you cannot start the ID with a number).

    4- (optional) Place all images (to rotate) in a new DIV (call it “Images”).

    Add this code to your page (in a script block):

    (function($){
      var imageIndex = 0;
      $(function(){
        var $homepage = $("#homepage"), 
            $images = $(".icon");
        $images.click(function(event){
          event.preventDefault();
          $homepage.hide("slow");
          $images.hide().eq(imageIndex++).show("slow");
        });
      });
    })(jQuery);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small self made gallery which im still working on it: http://springbreak.enteratenorte.com
I'm currently working on this website (http://www.jowannes.com/thomasschoof/flash/LauraBarsby.html) and I created a little gallery. When
Current demo here: http://www.studioimbrue.com/sites/eliotdudik I have the tabs system working wonderfully. I'm trying to
i have created a coverflow using the code given by http://android.jmsliu.com/138/android-infinite-loop-gallery.html . And it
I love the Slider Gallery on http://jqueryfordesigners.com/slider-gallery/ , but unfortunately it stopped working after
I'm working with google annotated time line graphs: http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html My question is: I would
I am working on a dynamic blog/portfolio: Ref Link: http://www.andrewryan.me/ I have been working
I have a photo gallery I am working on building, and I have a
I am trying to use the fancybox system described here: http://fearlessflyer.com/2011/01/create-an-awesome-photo-gallery-with-fancybox-and-timthumb/ I can get
I'm working on a page ( http://oscarspad.co.uk/Gallery/ ) which uses the Galleria plugin to

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.