title: How do I add OnClick function that goes to a page link (url) with javascript/jquery
body: <p>Ok I am using the fantastic map plugin found here: </p>
  
  <p><a href="http://jvectormap.owl-hollow.net/#maps" rel="nofollow">http://jvectormap.owl-hollow.net/#maps</a></p>
  
  <p>I am a noob ... can't figure out how to implement the parameter mentioned in the "reference" part on the documention which states you can use "onRegionClick". </p>
  
  <p>Can anyone tell me how to implement this so that when I click on a region ( A State on the US Map ) it goes to a URL?</p>
  
  <p>If this helps at all, my current working example shows the info I want on the page using the Parameter I want, but only in a div (div is called #location ) on the existing page. I would like it to got to a url instead.</p>
  
  <pre><code>&lt;script&gt;
  $(function(){
      $('#main').vectorMap({
          map: 'usa_en',
          color: '#aaaaaa',
          hoverColor: false,
          hoverOpacity: 0.5,
          colors: {pa:'#F00, ny:'#F00, },
          backgroundColor: 'false',
          onRegionClick: showmyinfo       
      });
  });
  
  function showmyinfo(event,label){
      switch (label)
      {
          case 'pa':
              $('#location').html('&lt;h3&gt;PA Locations:&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Location 1&lt;/li&gt;&lt;li&gt;123 This Street&lt;/li&gt;&lt;li&gt;Havertown, PA 19083&lt;/li&gt;&lt;/ul&gt;');
              break;
          case 'ny':
              $('#location').html('&lt;h3&gt;NY Locations:&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Location 1&lt;/li&gt;&lt;li&gt;123 This Street&lt;/li&gt;&lt;li&gt;Brooklyn, NY 11249&lt;/li&gt;&lt;/ul&gt;');
              break;
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Any help greatly appreciated</p>