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

  • Home
  • SEARCH
  • 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 8773575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:19:52+00:00 2026-06-13T18:19:52+00:00

I am working with a pretty cool interactive us map using jquert from newsignature

  • 0

I am working with a pretty cool interactive us map using jquert from newsignature (http://newsignature.github.com/us-map/). I am having trouble figuring out how I can enter unique information for each state when clicked on. In other words, when a user would click on Washington they would get certain information vs. when the click on Arkansas. Perhaps even the ability to have the content styled.

The current code I am using is:

$(document).ready(function() {
  $('#map').usmap({
    'stateSpecificStyles': {
      'AK' : {fill: '#0F253F'}
    },
    'stateSpecificHoverStyles': {
      'HI' : {fill: '#0F253F'}
    },

    'mouseoverState': {
      'HI' : function(event, data) {
        //return false;
      }
    },


    'click' : function(event, data) {
      $('#alert')
        .text('Click '+data.name+'  copy ')
        .stop()
        .css('backgroundColor', '#ff0')
        .animate({backgroundColor: '#ddd'}, 1000);
    }
  });


});

What I would like to see happen is when you click on a specific state it displays information regarding that state vs. the same info for each state.

  • 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-13T18:19:55+00:00Added an answer on June 13, 2026 at 6:19 pm

    Well, the state that they clicked on is in the data.name property. There are many ways to go about this. What have you tried?

    $('#map').usmap({
      // The click action
      click: function(event, data) {
        var description = "No state info loaded for this state.";
        switch(data.name)
        {
            case 'IL':
                description = 'You clicked on the Land of Lincoln!';
                break;
            case 'MO':
                description = 'You clicked on the Show-Me State!';
                break;
            // etc
        }
        $('#clicked-state')
          .text(description)
          .parent().effect('highlight', {color: '#C7F464'}, 2000);
      }
    });
    

    Actually, now that I look more at the documentation, you could also make state-specific methods like this:

    $('#map').on('usmapclickIL', function(event, data) {
        $('#clicked-state')
          .text('You clicked on the Land of Lincoln!')
          .parent().effect('highlight', {color: '#C7F464'}, 2000);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jquery UI tabs and working pretty well and now I want
I'm using the Microsoft Symbol Server with Visual Studio 2008 and it's working pretty
I am currently working away with FullCalendar, which is pretty cool and has done
i am using this tutorial for progress which is working pretty well , i
I am using Facebook C# SDK and it's working pretty well. I want to
I have recently started using Visual Studio 2010 and ReSharper 5.1. It's working pretty
I'm working on trying to figure out storyboards and it all seems pretty cool
I have had pinch-to-zoom working pretty well for a few application versions now using
I've started using Xcode4's SenTest unit testing facilities. It's been working pretty well, but
this is actually my first ZK project seems pretty cool but not working and

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.