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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:20:43+00:00 2026-06-18T05:20:43+00:00

i have a tricky problem I’m not able to solve. I’m using jquery.prettyphoto.js to

  • 0

i have a tricky problem I’m not able to solve. I’m using jquery.prettyphoto.js to display a set of images in a “lightbox”.

The first photo in that set is the “AvatarPhoto” and it’s rendered twice on the page. First on top, standing alone and also in a slider with all the other photos. Both are linking to the same picture in the same gallery.

Take a look at this: http://jsfiddle.net/wtZLY/

okay I solved that based on halfer´s answer, simply gave the first link of “allFotos” an id :

    $('#profilePicture').click(function() {
    $('#foto_0').click();
    });

but I wonder if I can´t use the prettyphoto API

$.prettyPhoto.open()

but looks like I there is no possibility to simply open the prettyPhoto[gallery1] down on the page. I would have to pass all images and titles as an Array and in my case this would be heavy repeating myself.

  • 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-18T05:20:44+00:00Added an answer on June 18, 2026 at 5:20 am

    Your selector works on this attribute:

    data-rel="prettyPhoto[gallery1]"
    

    If it is not your intention to add the first picture to the gallery, remove the data-rel attribute from that image, and it will work.

    Personally, I’d use standard tags/ids/classes for this. In your JS you could alternatively use this:

    $("#allpictures a").prettyPhoto();
    

    That will select all links that are a descendent of the allpictures element.

    Addendum: if you want to open the gallery using your profile picture, then I suggest you use the above for the gallery items, but have a special click handler for the profile. Set up an id for each image, such that the profile picture can be used to determine the gallery copy. For example you could use profile_123 and gallery_123.

    This will permit you to add a click handler on the profile image, derive the id of the gallery copy, and to raise the click event on that element.

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

Sidebar

Related Questions

I have sort of a tricky problem I'm attempting to solve. First of all,
I have a tricky problem and I'm not sure where in the view rendering
I have a tricky problem where I am binding a ContextMenu to a set
I have quite a tricky problem: I am using a ListView control with the
I have tricky problem which I can't completely understand. It's jQuery tabs with cookie
Now this is a tricky problem for which I'm not able to figure out
I have a tricky problem that has had me scratching my head for a
I seem to have a tricky problem since the latest ADT update to release
I have a very tricky problem going on with content inside a textarea on
I have the following tricky problem: I have implemented a (rather complicated) class which

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.