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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:29:54+00:00 2026-06-10T05:29:54+00:00

Hi i am using the jQuery Lightbox Me plugin to open a popup on

  • 0

Hi i am using the jQuery Lightbox Me plugin to open a popup on a page but i want multiple links to open the same popup.

The Code:

<script src="./pop_files/jquery.lightbox_me.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
    $(function() {
        function launch() {
             $('#sign_up').lightbox_me({centered: true, onLoad: function() { $('#sign_up').find('input:first').focus()}});
        }

        $('#try-1').click(function(e) {
            $("#sign_up").lightbox_me({centered: true, onLoad: function() {
                $("#sign_up").find("input:first").focus();
            }});

            e.preventDefault();
        });
        $('#try-2').click(function(e) {
            $("#sign_up").lightbox_me({centered: true, onLoad: function() {
                $("#sign_up").find("input:first").focus();
            }});

            e.preventDefault();
        });
        $('table tr:nth-child(even)').addClass('stripe');
    });
</script>
<link rel="stylesheet" href="./pop_files/styles.css" type="text/css" media="screen" title="no title" charset="utf-8">

The links:

<a href="./pop_files/pop.htm" id="try-1">Open pop link 1</a>
<a href="./pop_files/pop.htm" id="try-2">Open pop link 2</a>

The problem i’m having is, i need to give every link a new (id=”try-…”) for it to work this is fine for 2 link but fore 50 it is a bit unnecessary i think.

There must be a easier way of doing this, so any ideas most appreciated.

Regards Kevin.

  • 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-10T05:29:56+00:00Added an answer on June 10, 2026 at 5:29 am

    try using a class instead of an id. give all the links the same class:

    $('.try').click(function(){
        //some code...
    }) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jquery lightbox plugin colorbox ( http://colorpowered.com/colorbox/ ) and i want to
I am using a jquery lightbox plugin ( http://colorpowered.com/colorbox/ ) to load content using
A while back I created a lightbox plugin using jQuery that would load a
I'm using the JQuery prettyPhoto lightbox clone, and it works great, but I have
This is my first time using lightbox which uses jquery framework. But when I
I am trying to use Lightbox plugin but with jquery there is a conflict
I'm using prettyphoto jquery plugin for lightbox. When somebody clicks on a link it
I am developing my own lightbox kind of jquery plugin. Everything works but I
I'm using the jQuery Lightbox plugin, although I don't know if that's necessary information
I have a website that consists of one parent page. Using the lightbox-style jQuery

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.