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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:34:45+00:00 2026-06-12T08:34:45+00:00

I wonder whether someone may be able to help me please. Firstly, I am

  • 0

I wonder whether someone may be able to help me please.

Firstly, I am relatively new to this, so may I ask for your patience please.

I’ve put together this page which allows users to show and hide Google Map markers and associated ‘Sidebar’ items pertinent to the ‘Category’ check box they select.

What I’m now trying to, and having great difficulty in doing, is to change the format of the sidebar, so that it resembles the one shown on this page.

As with the example from the link above, I’d also like to add the functionality whereby if the map marker is clicked, the associated sidebar item is highlighted.

I’ve been trying to get this to work for quite some time now, but I just seem to be going around in circles.

I just wondered whether someone may be able to look at this please and offer some guidance on how I may be able to go about achieving this.

Many thanks and kind regards

  • 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-12T08:34:47+00:00Added an answer on June 12, 2026 at 8:34 am

    I gave it a go, just replace your following code:

    google.maps.event.addListener(marker, 'click', function() { 
       infowindow.setContent(contentString);
       infowindow.open(map,marker); 
    });
    

    for this one:

    google.maps.event.addListener(marker, 'click', function() { 
       infowindow.setContent(contentString);
       $("#sidebar a").css('background-color','');//remove sidebar links back colors
       sidebarlink = $("#sidebar a:contains('"+marker.mydescription+"')");
       sidebarlink.css('background-color','#58FAD0');
       infowindow.open(map,marker); 
    });
    

    that will set a background color to the sidebar link, you can change the color to whatever you want or add any other css styles you prefer to your link.

    Also make sure your description text in the mydescription variable does never contains a quot ' or double quote " as would make above code to fail.

    Let me know if this work as you expected.

    Also, if you wish to also remove the background color from the sidebar links when you click anywhere your map(e.g. clicking outside of markers) do it by replacing your following code:

    google.maps.event.addListener(map, 'click', function() { 
       infowindow.close(); 
    });
    

    for this one:

    google.maps.event.addListener(map, 'click', function() { 
       $("#sidebar a").css('background-color','');//remove sidebar links back colors
       infowindow.close(); 
    });
    

    To get the background color changing on hover on sidebar links (issue 1), just add the following piece of css code to any of your <style type="text/css"> blocks:

    #sidebar a:hover{
       background-color: #58FAD0;   
    }​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder whether someone may be able to help me please. Firstly, this is
I wonder whether someone may be able to help me please Firstly, my apologies
I wonder whether someone may be able to help me please. Firstly apologies as
I wonder whether someone may be able to help me please. Firstly, my apologies
I wonder whether someone may be able to help me please. Firstly my apologies.
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able to help me please. Firstly, apologies because
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able yo help me please. I've put together

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.