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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:13:53+00:00 2026-05-26T11:13:53+00:00

I have two pop up dialog boxes for the links in the footer Return

  • 0

I have two pop up dialog boxes for the links in the footer Return Policy and Privacy Policy . I have the javascript and all the files.

Currently only one of the pop up opens when both the links are clicked. I want each link to open its own respective pop up dialog box.

The webpage where this is located is at http://www.sarahjanetrading.com/js/j/index.html

The javascript file is located at http://www.sarahjanetrading.com/js/j/js/popups.js.

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-05-26T11:13:54+00:00Added an answer on May 26, 2026 at 11:13 am

    You have the click tag on the surrounding span #dialog. So basicly no matter where you press in the span the same popup will open.

    Then you display both Dialogs on top off eachother, with return policy being the last dialog, it overlays the other.

    What you need to do is bind it to the links

    $("#dialog a").click(function(){
        //centering with css
        centerPopup();
        //get id of the clicked
        var clickedLink = $(this).attr('id');
        //load popup
        loadPopup(clickedLink);
    });
    

    And then only show the click dialog:

    function loadPopup(clickedLink){
        //loads popup only if it is disabled
        if(popupStatus==0){
            $("#backgroundPopup").css({
                "opacity": "0.7"
            });
            $("#backgroundPopup").fadeIn("slow");
            $("#"+clickedLink).fadeIn("slow");
            popupStatus = 1;
        }
    }
    

    Updated version

    You could get the dialog ID by using the href and then do it like:

    <a href="#privacyPolicy-popup" id="returnPolicy">Return Policy</a>
    

    And

    $("#dialog a").click(function(){
        //centering with css
        centerPopup();
        //get id of the clicked
        var clickedLink = $(this).attr('href');
        //load popup
        loadPopup(clickedLink);
    });
    

    And

    function loadPopup(clickedLink){
        //loads popup only if it is disabled
        if(popupStatus==0){
            $("#backgroundPopup").css({
                "opacity": "0.7"
            });
            $("#backgroundPopup").fadeIn("slow");
            $(clickedLink).fadeIn("slow");
            popupStatus = 1;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two questions here. How can I show the header of the pop
Have two folders with approx. 150 java property files. In a shell script, how
I have two files client.php and server.php. The client file send a HTTP request
I have two kml files. One contains polygons for counties, and the other pins
I have two UIViewControllers, A and B, where A overrides the shouldAutorotateToInterfaceOrientation to return
I have below a javascript function which gets called on click of two separate
So I have two lists and I want to use .pop() to remove an
Currently i have two models: Rate and Item Rate is a model for voting,
I have a web application that, under some conditions, pop up JavaScript alert()s that
I have two files that are exact in coding, file A and B. Within

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.