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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:47:04+00:00 2026-06-01T15:47:04+00:00

I am using a gallery script with thumbnails on the following post on my

  • 0

I am using a gallery script with thumbnails on the following post on my site

http://www.lookbookcookbook.com/2012/03/apple-cinnamon-pancakes.html

It works fine, but when you go to the main page (third post down), it stops working. Is it because I have another post with the same script that is interfering?

Any help would be much appreciated, thanks!

  • 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-01T15:47:06+00:00Added an answer on June 1, 2026 at 3:47 pm

    Your script uses ids to target the picture to show. Ids should be uniques, only one element can have any given Id.

    Your two galleries’ img are sharing same Ids : #pic-0, #pic-1, etc. So on click, only the first one found is shown, the img in the first gallery.

    It should not be too hard to solve, but a lot of your code must be CMS-generated, so I must know what you can change to help more.

    (that’s the piece of code handling your gallery:)

    function myshowImages(id) {
     /* $(".mainPic").hide(); 
    $("#pic-"+id).show();*/ 
    $('.mainPic').css({'display':'none'}); 
    $("#pic-"+id).fadeIn('slow');  
    }
    

    edit after comments :

    So, honnestly your code is a bit of mess, there would be lots of change to achieve something clean.
    However, for your immediate needs, you should use two showImage functions :

    function myshowImages1(id) {
    $('.mainPic1').css({'display':'none'}); 
    $("#pic-"+id).fadeIn('slow');  
    }
    
    function myshowImages2(id) {
    $('.mainPic2').css({'display':'none'}); 
    $("#pic-"+id).fadeIn('slow');  
    }
    

    And edit your links :
    for the first gallery.
    for the second one.

    Keep in mind that it’s ugly and not scalable : if you have three gallery, it’ll break.
    I’m going to look at your code to see how you could do to have a unique function.

    Edit2 :

    So, a cleaner function for you to use :

    1/ setup : chose a classname for each link/img pair. Per exemple :

    <a href="" class="image_1">
    <img alt="" height="80" src="(some long path)/lookbookcookbooksaya267b.jpg" title="" width="80">
    </a>
    

    the thumb link and the image to show :

    <a href="(some long path)/lookbookcookbooksaya267.jpg">
    <img alt="" class="image_1" height="470" src="(some long path)/lookbookcookbooksaya267.jpg"></a>
    

    Then, I’ve seen you have JQuery, so this kind of function :

    $(document).ready(function()
    {
         $(".gallery div div a").on("click",function()
         {
         var myClass = $(this).attr('class');
         var $parentGallery = $(this).parents('.gallery');
         $parentGallery.find("div > a > img").css("display","none").find("myClass").fadeIn();
         return false;
        });
    });
    

    First, it binds a click event on all your links which are two div depth in the .gallery element. That’s your thumbs.
    On click, it fetches the class of the clicked thumb link.
    Then it searches for the parent .gallery of this link, hide alls images and show the good one.

    I can’t really guarantee it’ll work out the box because your markup is very complex, but it should.

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

Sidebar

Related Questions

I have an URL like this: http://site.com/galleries/galleryname/imageID123/lightbox/ and using a script to replace the
I am using this zoom image script to load thumbs into larger images: http://www.eyecon.ro/zoomimage/#implement
I am using a bespoke Jquery/PHP gallery script which pulls images from a Flickr
I am using a script called swipeview to put multiple instances of a gallery
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 using the http://fancyapps.com jQuery plugin Fancybox v2. It took me a while to
I made a simple gallery, using this script to show the images: $rs =
I have a php script im currently using that creates thumbnails based on a
I am using Gallery like this <Gallery android:id=@+id/gallery1 android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginBottom=10dp android:spacing=2dp > </Gallery>
I am using a Gallery and I bind a ImageView , ImageButton and a

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.