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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:22:14+00:00 2026-05-25T23:22:14+00:00

I have two images with the title Show Options it looks like this: <a

  • 0

I have two images with the title “Show Options” it looks like this:

<a class="io-content-pane-header-button-right" style="right: 41px;"><img class="io-content-pane-header-button" src="/document/c947bf0e-0144-4fc8-8a33-ce0d0d698384/latest" title="Show Options"></a>

I have the following jQuery to display another div called “recordViewPopover” when this image is clicked.

$('img[title*=\"Show\"]').live('click', function(e) {
    console.log('RECORD VIEW OPTION SELECTED!');
     e.stopImmediatePropagation();      
    var position = $(this).parent().offset(); 
    $('#recordViewPopover').css('top', (position.top + $(this).height()) - 50);
    console.log(position);
    $('#recordViewPopover').fadeToggle('fast');
    if ($('img[title*=\"Show\"]').hasClass('active')) {
      $(this).removeClass('active');
    } else {
      $('img[title*=\"Show\"]').addClass('active');
    }
  });

The problem is, I want to be able to show another DIV called “objectViewPopover” when the 2nd image is clicked. Right now, when I click on the 2nd image, only “recordViewPopover” is shown.

How can I solve this?

UPDATE:

here is a simpler scenario, I am just going through each of the images:

$('img[title*=\"Show\"]').each(function(index, value){
    if(index === 0){
        console.log('object');
        $(this).live('click', function(e) {

            console.log('OBJECT VIEW OPTION SELECTED!');

        });
    }
    else
        console.log('record');
  });

Why doesn’t the click bind to the first match?

  • 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-25T23:22:15+00:00Added an answer on May 25, 2026 at 11:22 pm

    If the positioning of the images in the DOM is consistent you could do something like

    if($(this).is(':last-child'))...
    

    Or you could give the images a unique class:

    <a class="io-content-pane-header-button-right recordView" style="right: 41px;"><img class="io-content-pane-header-button" src="/some/src" title="Show Options"></a>
    
    <a class="io-content-pane-header-button-right objectView" style="right: 41px;"><img class="io-content-pane-header-button" src="/some/other/src" title="Show Options"></a>
    

    and do

    if($(this).hasClass('objectView'))...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two different arrays like this var images = [{ src: images2/animal_1.jpg, title:
I have two images with the title Show Options. I want to assign a
I have two images which i would like to compare and do different operations
I have two images - 1)a rectangular one, displaying the actual content and 2)a
I have this: <html> <head> <title></title> <meta http-equiv='Content-Type' content='text/html; charset=utf8'> <style type='text/css'> body {
Using CSS, is it possible to right-align two DIVs? I have a title and
I have two tables. products id title image_ids --------------------- 1 myproduct 1,2,3 images id
I have these two tables: Galleries - {id,title,description} Images - {id,gallery_id,file} Each gallery has
I have two images, both taken at the same time from the same detector.
I have two images on a WPF window that are on top of each

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.