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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:14:56+00:00 2026-05-30T12:14:56+00:00

I have an infoBox displayed on a map that is populated with a list

  • 0

I have an infoBox displayed on a map that is populated with a list of links (I have given these links the class ‘.mapLinks’).

My goal is to use JQuery within the ‘main page’ (contained within the page where maps canvas div is located) to identify and disable the links and instead use them to reveal a div that is located on the ‘main page’. My JQuery is as follows;

$('.mapLinks').click(function(event) {
    event.preventDefault();
    $('#divOnMainPage').addClass('hidden');
});

Any help would be greatly appreciated.

  • 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-30T12:14:58+00:00Added an answer on May 30, 2026 at 12:14 pm

    If they are added dynamically you will need to use .delegate():

    $(document).delegate('.mapLinks', 'click', function(event) {
        event.preventDefault();
        $('#divOnMainPage').addClass('hidden');
    });
    

    Or if you are using 1.7+ you can use the .on() syntax:

    $(document).on('click', '.mapLinks', function(event){
        event.preventDefault();
        $('#divOnMainPage').addClass('hidden');
    });
    

    This will bind the event to a parent element (document in this case) and catch the bubble up of the event. Therefore you can add and remove .mapLinks dynamically and it will still work.

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

Sidebar

Related Questions

I have to follow code: <div class=beeldengeluid-infobox style=float: right; margin: 0em 0em 1em 1em;
I have two Fusion Tables that are added as layers to a map visualization.
Well lets say i have this <table class=infoBox> <tr> <td> test </td> <td> <table>
I created an unordered list with the following html: <ul id=infoBox> <li class=facebook><a href=<?php
I have created an infobox using google maps api v3 and infoBox from the
I have an application using the Google Maps javscript API and the Infobox plug-in
have written this little class, which generates a UUID every time an object of
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
I have a map_canvas with a width of 225. I want my infobox to
I have an application that connects to a server. In the status bar I

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.