在页面加载后更改.attr填充

时间:2015-11-01 22:22:54

标签: jquery



<html lang="nl-NL" class="firefox firefox41 desktop custom-responsive">

<head>
  <meta charset="UTF-8">
  <title>Regions</title>
  <!-- Created by Artisteer v4.2.0.60623 -->




  <link media="all" type="text/css" href="http://jvectormap.com/css/jquery-jvectormap-2.0.3.css" id="rvm_jvectormap_css-css" rel="stylesheet">


  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>


  <script src="http://jvectormap.com/js/jquery-jvectormap-2.0.3.min.js" type="text/javascript"></script>





</head>

<body>

  <script>
    function getUrlVars() {
      var vars = {};
      var parts = window.location.href.replace(/[?&amp;]+([^=&amp;]+)=([^&amp;]*)/gi, function(m, key, value) {
        vars[key] = value;
      });
      return vars;
    }

    var prov = getUrlVars()["provid"];
    prov = 'NL-' + prov;



    jQuery(document).ready(function() {
      jQuery("button").click(function() {
        //        jQuery("path[data-code="+prov+"]").attr("fill", "#ccc");//werkt wel
        jQuery("path[data-code=NL-FR]").attr("fill", "#ccc"); //werkt wel
      });
    });
  </script>

  <script>
    jQuery(document).ready(function() {

      //jQuery(function){
      jQuery("path[data-code=NL-OV]").attr("fill", "#ccc");

    });
  </script>


  <button>Click me</button>

  <div id="art-main">
    <div class="art-sheet clearfix">


      <div id="container">
        <div role="main" id="content">




          <div class="art-layout-wrapper">
            <div id="zoek_resultaten"></div>
            <div class="art-content-layout">
              <div class="art-content-layout-row">
                <div class="art-layout-cell art-content">

                  <article style="" class="art-post art-article  post-5220 page type-page status-publish hentry" id="post-5220">
                    <h1 id="post-5220" class="art-postheader">Regions</h1> 
                    <div class="art-postcontent clearfix">
                      <div style="width: 200px; height: 238.106px; max-height: 238.106px;" id="netherlands-map-5222" class="map-container rvm-map-container" data-ver="4.0">
                        <div style="width: 96%; height: 96%; padding: 2%; position: relative; overflow: hidden; background-color: rgb(255, 255, 255);" class="jvectormap-container">
                          <svg width="100%" height="100%" viewBox="0 0 100% 100%">
                            <g transform="scale(0.2062570099700437) translate(15.438726247136158, 0)">
                              <path d="M590.82,402.8l-0.89,-6.79l-2.97,-14.16l-1.58,-6.37l-2.15,-3.69l12.16,-5.88l2.88,-0.19l1.35,0.76l3.81,0.64l2.41,-0.16l11.35,-3.91l7.47,-4.18l0.11,-0.6l-5.26,-6.35l-4.65,-2.54l-9.41,-2.78l-2.27,-1.26l1.99,-2.06l2.27,-4.55l-1.79,-9.97l-3.33,-9.82l-4.42,-6.52l-10.97,-8.98l-16.47,-9.03l7.79,-3.91l3.62,2.75l6.61,1.1l3.22,-0.42l7.13,-4.27l4.41,-6.43l5.71,-1.78l1.52,-1.27l1.43,0.58l2.76,4.06l3.39,2.54l9.33,0.72l3.67,-4.0l0.52,-2.43l0.6,-0.67l3.69,-1.05l4.58,-0.5l9.55,-3.79l11.57,13.96l4.2,4.4l2.02,3.15l-0.96,3.02l-8.34,8.27l-6.1,2.99l-2.43,4.09l8.07,21.61l4.43,5.35l3.51,0.53l3.4,-2.47l1.41,-0.36l3.53,1.33l7.19,4.97l2.05,0.73l12.04,0.02l1.81,2.92l7.57,7.02l1.84,2.76l2.13,5.69l1.31,0.66l1.68,0.0l5.45,-1.69l2.9,-1.94l0.86,0.44l2.03,2.71l1.35,0.68l1.73,-0.18l2.9,-2.27l1.54,0.0l1.32,0.24l9.63,4.67l0.57,-0.38l-0.68,-11.4l0.46,-1.63l2.8,-2.99l11.27,-5.9l6.73,-1.22l2.92,0.1l16.76,7.71l1.27,1.04l0.75,0.91l-0.1,2.76l0.58,3.21l2.14,1.47l-3.59,3.03l1.91,3.93l-1.51,6.61l0.07,3.18l1.78,2.78l7.18,6.11l-12.39,6.29l-3.77,0.35l-0.32,0.57l2.84,5.98l1.15,13.51l1.47,5.81l4.69,5.56l6.28,3.13l18.58,2.65l12.07,4.62l6.64,1.07l6.26,-0.39l5.92,-1.72l2.34,-2.16l1.46,-2.56l1.04,-0.5l14.01,22.89l3.24,9.73l-1.94,13.8l-4.67,10.9l-1.71,5.9l-0.16,7.12l2.09,8.17l1.91,3.53l-0.55,1.67l-10.39,6.36l-2.54,3.01l-5.47,8.9l-4.57,4.06l-10.09,4.5l-4.54,4.79l-5.21,10.62l-2.81,2.54l-13.6,1.56l-2.69,-2.02l-22.36,-4.78l2.17,-5.42l-0.18,-5.85l-1.19,-2.93l-3.14,-1.57l-2.1,-0.53l-9.06,1.87l-0.72,-0.26l-0.22,-2.61l-0.83,-1.9l-1.65,-0.73l-8.03,1.29l-8.94,-1.1l-5.49,0.61l-6.7,-6.42l-12.99,-19.27l-7.16,-0.82l-8.02,3.28l-3.51,2.65l-2.2,0.65l-14.7,0.24l-18.64,-3.37l-3.21,2.24l-1.65,2.5l-0.87,-0.1l-1.81,-1.69l-0.88,-1.65l0.92,-3.17l-0.42,-2.08l-4.74,-3.0l-0.32,-0.99l0.46,-4.51l-4.2,-11.0l-4.91,-2.41l-4.06,-5.95l2.29,-10.94l2.2,-3.45l-1.27,-4.16l0.92,-0.82l7.97,-2.85l3.48,-9.34l0.33,-4.28l-0.37,-1.39l-5.34,-8.1l-3.9,-10.82l-1.56,-2.34l-5.81,-5.92l-3.33,-6.1l-4.6,-2.34l-7.21,3.68l-7.4,6.34l-6.89,2.11l-1.68,-0.44l-1.36,-1.2l-4.91,-9.46l-2.92,-4.46l-3.97,-0.62Z"
                              data-code="NL-OV" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M554.87,280.98l-2.74,-1.87l-17.1,-4.9l-3.62,0.16l-3.88,1.39l-7.47,4.76l-3.71,0.48l-3.37,-0.8l-5.49,-3.6l-3.08,-0.86l-14.89,-0.53l-7.26,-1.92l-6.45,-5.98l-3.13,-2.15l-0.76,-2.33l0.11,-3.57l0.98,-1.09l1.43,-0.61l2.6,-4.49l3.69,-2.05l2.21,-3.13l-2.98,-6.34l3.73,-4.29l1.03,-6.3l-0.99,-6.45l-2.21,-4.27l1.38,-4.59l0.26,-5.03l-1.0,-4.94l-2.38,-1.6l-2.22,-3.96l-4.06,-11.81l-0.6,-0.22l-19.86,12.56l-22.99,20.39l-1.8,-5.85l23.41,-21.08l3.48,-4.12l4.25,-3.56l10.69,-2.53l5.01,-3.31l4.84,-9.73l6.37,-26.57l4.74,-11.84l8.16,-9.6l4.99,-4.4l8.7,-3.84l3.93,-4.5l3.63,-5.29l4.14,-4.28l4.65,-1.66l11.14,-1.87l8.29,-7.15l37.42,-15.14l8.39,-6.06l5.39,-0.46l15.64,-8.07l47.18,-1.92l-2.24,4.49l-1.19,4.8l2.29,8.73l8.75,3.48l3.17,3.85l0.98,0.58l1.64,0.15l3.37,-1.53l4.1,1.39l1.09,3.14l-0.65,8.69l0.6,0.82l1.97,0.9l-7.71,8.06l-0.9,1.85l-1.16,4.99l-6.36,11.77l1.84,7.93l-0.56,1.44l-8.64,11.58l-2.43,4.88l-1.67,8.49l1.08,8.49l2.3,3.04l3.24,2.88l2.12,0.68l9.93,0.96l3.93,1.42l10.21,6.54l-0.41,5.06l0.84,1.04l3.79,2.28l6.46,2.78l0.99,3.02l-0.19,2.22l2.13,8.19l12.71,17.2l2.75,5.76l-0.96,3.66l-6.38,10.57l-1.39,1.52l-10.91,7.36l-7.73,-5.25l-5.33,-1.38l-6.48,0.11l-4.21,3.7l-7.8,9.0l-19.74,15.26l-9.72,3.86l-4.52,0.49l-3.96,1.16l-0.89,1.01l-0.44,2.3l-3.15,3.65l-8.91,-0.66l-3.1,-2.35l-2.73,-4.04l-2.12,-0.87l-1.69,1.34l-4.64,1.12l-1.28,0.77l-4.47,6.48l-6.82,4.1l-2.92,0.4l-6.51,-1.08l-3.93,-2.81l-8.47,4.26l-14.8,-12.95ZM655.6,34.73l-4.49,5.63l-1.1,-2.87l1.41,-2.18l-2.32,-5.13l5.61,-4.96l8.66,-3.9l6.12,-1.55l23.04,-2.06l6.17,1.96l0.0,1.99l-2.91,0.02l-40.19,13.06ZM599.65,33.55l8.48,4.46l-22.05,5.12l-24.08,0.01l-6.11,1.61l-11.12,5.13l-5.65,-1.35l-3.91,-5.57l1.32,-5.5l3.65,-3.08l3.5,1.5l55.97,-2.33ZM485.87,59.2l-10.51,4.64l-8.36,2.16l-32.3,14.28l-6.32,-0.15l-2.71,-5.58l2.5,-6.39l12.35,-4.36l4.17,-3.8l5.28,0.15l31.4,-6.45l7.04,-5.51l33.59,-6.53l-4.77,6.67l-6.45,2.27l-13.58,0.57l-0.36,0.53l1.34,5.27l-2.67,1.42l-9.64,0.8ZM370.71,129.98l-5.74,5.06l-6.6,-2.96l9.58,-12.43l15.2,-14.11l15.73,-9.21l11.29,1.55l0.0,1.92l-6.03,0.05l-2.92,1.68l-6.91,2.66l-18.44,18.08l-5.16,7.69Z"
                              data-code="NL-FR" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M465.08,496.13l5.2,3.8l10.14,4.83l-1.99,13.92l1.45,2.59l8.29,6.76l-0.43,3.46l-0.73,1.44l-1.94,1.75l-0.27,0.91l1.45,2.89l10.55,3.11l1.51,1.19l2.09,3.11l2.84,2.13l2.29,2.73l-0.03,1.11l-1.16,2.39l0.25,4.62l-2.57,0.06l-3.85,9.15l-2.83,2.78l0.77,2.03l6.67,3.39l2.45,-0.75l2.5,-1.95l1.76,-0.39l1.93,-1.76l1.07,-2.02l0.48,-3.06l-0.88,-2.56l3.02,-0.71l2.57,11.55l-0.32,9.14l2.07,11.53l3.05,5.5l4.78,5.17l2.54,5.07l0.73,3.35l-0.11,5.84l-0.66,1.41l-7.48,-1.83l-17.96,-10.85l-10.2,-2.19l-3.24,0.87l-6.65,4.3l-2.48,-0.11l-6.08,-2.22l-5.41,1.18l-6.97,5.34l-4.61,1.19l-13.27,-7.3l-3.64,0.82l-4.14,3.22l-5.46,1.05l-5.58,-0.8l-4.28,-2.28l-2.13,-2.66l-3.31,-5.72l-2.85,-2.24l-3.39,-0.78l-4.51,2.73l-5.4,1.52l-2.15,1.68l-3.33,4.28l-2.14,0.95l-9.96,-2.05l-7.97,4.92l-6.5,6.72l-2.19,0.91l-5.21,-0.31l-1.58,2.07l-4.83,-7.43l-7.46,-9.57l-1.96,-3.37l0.54,-0.81l6.13,-3.14l-0.86,-5.01l-0.44,-0.31l-10.39,1.41l-0.83,-1.94l7.25,-11.07l9.11,-4.54l1.84,-2.72l-0.33,-0.62l-10.24,-0.07l-2.9,-13.86l-3.73,-1.57l-2.87,-2.52l6.65,-7.16l1.01,-0.34l1.07,-0.23l6.49,3.0l1.47,-0.39l0.61,-1.93l-2.73,-9.43l1.91,-1.58l0.01,-0.61l-11.39,-9.81l-5.18,-2.09l-2.47,-2.95l-2.79,-4.91l10.47,-3.1l4.71,-2.43l3.59,-3.7l4.99,-2.47l9.23,-1.29l3.53,-6.4l1.62,-1.16l2.15,0.16l4.47,-0.79l5.83,-3.21l2.81,0.54l2.58,2.6l3.69,-1.64l7.69,0.72l-5.59,2.21l-1.32,1.96l1.75,5.49l2.54,2.4l2.07,3.64l-3.8,4.76l-1.77,7.75l2.57,14.03l0.48,0.33l6.14,-1.29l4.2,-1.94l8.73,-1.63l12.94,0.71l4.98,-3.42l4.64,-10.32l0.82,-4.53l4.73,-11.77l4.17,-7.03l2.68,-1.22l14.41,-0.28Z"
                              data-code="NL-UT" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M590.85,403.61l3.38,0.41l2.79,4.26l4.93,9.51l1.74,1.51l2.1,0.49l7.08,-2.16l7.58,-6.44l6.58,-3.5l4.12,2.03l3.33,6.09l5.87,5.99l1.43,2.17l3.87,10.75l5.34,8.08l-0.02,5.24l-3.37,9.0l-7.61,2.57l-1.37,1.22l1.23,4.44l-2.15,3.25l-2.34,11.23l4.31,6.5l4.78,2.27l4.12,10.78l-0.48,4.17l0.4,1.5l4.71,2.94l0.38,1.61l-0.93,3.4l1.11,2.13l1.92,1.8l1.64,0.2l1.91,-2.69l2.7,-2.02l18.47,3.36l14.89,-0.23l2.56,-0.77l3.44,-2.61l7.88,-3.22l6.66,0.81l12.65,18.98l6.92,6.65l5.86,-0.52l8.96,1.1l7.95,-1.3l1.09,0.41l0.71,1.59l0.21,2.73l1.28,0.75l1.18,0.17l8.21,-2.0l3.95,1.46l1.23,1.41l0.63,5.19l-0.07,1.92l-2.29,5.66l0.29,0.54l22.74,4.86l1.8,1.39l-4.25,2.25l-3.99,4.15l-3.2,7.08l-1.77,2.28l-2.66,1.34l-2.56,0.19l-2.27,1.23l-1.65,4.13l0.47,5.78l3.89,2.94l5.21,1.58l15.18,8.53l7.14,8.1l0.55,2.43l-0.21,4.42l-0.98,0.96l-1.88,0.42l-1.95,2.12l-5.37,9.75l-5.38,6.44l-6.18,3.38l-20.72,0.66l-23.28,7.97l-11.58,8.9l-3.73,1.72l-4.6,0.0l-14.93,-4.42l-0.5,0.47l1.88,8.44l-0.87,3.44l-8.11,2.27l-0.84,-5.72l-3.96,-2.28l-8.79,-1.35l-3.53,-5.79l-1.74,-1.72l-2.29,-0.32l-7.18,1.58l-7.73,-3.18l-7.55,-6.12l-7.89,-3.57l-7.96,4.31l-0.05,0.67l2.87,2.19l8.68,9.17l2.59,4.09l-16.09,-4.14l-9.63,2.6l-3.39,1.81l-4.81,3.59l-4.43,1.9l-9.51,1.71l-4.04,2.82l-0.81,4.02l5.23,4.04l3.04,7.1l-0.39,7.41l-4.36,4.03l-6.57,-4.66l-5.41,-7.36l-1.92,-0.25l-2.41,0.5l-2.25,1.51l-0.27,4.99l-23.52,-1.18l-16.23,-11.32l-4.57,-1.23l-2.07,-1.53l-2.85,-7.18l-1.63,-1.89l-10.6,-2.35l-14.85,2.29l-3.26,-1.09l-4.81,-3.08l-4.6,1.87l-4.53,3.42l-4.66,1.73l-9.36,-0.7l-4.88,2.55l-2.19,7.61l-1.18,6.29l-2.94,4.72l-4.04,3.4l-4.35,2.19l-42.64,4.74l-1.59,-0.55l2.48,-5.95l-0.14,-6.42l-8.64,-5.88l-2.89,0.77l-5.47,-0.19l-8.57,-6.6l-3.57,-3.91l-0.92,-8.65l0.65,-3.8l-1.18,-1.95l6.2,-0.4l17.96,-7.61l2.49,-1.58l0.4,-2.31l-0.81,-3.75l9.23,-16.47l5.7,-11.74l3.31,0.43l5.62,-1.08l4.31,-3.3l3.24,-0.69l13.3,7.3l4.99,-1.33l6.81,-5.26l4.98,-1.15l6.03,2.2l2.77,0.14l2.43,-1.11l4.57,-3.29l2.76,-0.76l9.92,2.1l17.96,10.85l8.42,1.75l0.87,-1.95l0.11,-5.96l-0.78,-3.59l-2.6,-5.2l-4.86,-5.29l-2.89,-5.2l-2.05,-11.42l0.32,-9.15l-2.69,-12.01l-0.48,-0.29l-3.84,0.9l-0.28,0.53l0.98,2.73l-0.44,2.82l-0.93,1.76l-1.65,1.53l-1.74,0.39l-2.5,1.95l-1.92,0.69l-6.28,-3.14l-0.62,-1.07l2.77,-2.77l3.77,-8.98l2.69,-0.16l-0.17,-5.03l1.12,-2.2l0.08,-1.51l-2.53,-3.19l-2.82,-2.1l-2.04,-3.06l-1.72,-1.37l-10.35,-2.95l-1.26,-2.33l2.87,-3.84l0.51,-3.88l-8.55,-7.22l-1.2,-2.05l1.97,-13.77l9.51,0.8l20.32,-5.1l2.87,-2.97l7.58,-17.96l10.6,-12.82l7.08,-5.74l13.51,-4.12l8.09,-4.29l7.65,-5.65l5.16,-5.72l9.56,-13.43l4.47,-7.83l2.83,-9.06l0.4,-7.38Z"
                              data-code="NL-GE" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M554.96,281.42l4.09,-0.16l2.11,1.33l5.75,6.13l2.51,6.05l17.1,9.37l10.77,8.81l4.29,6.3l3.31,9.75l1.74,9.73l-2.16,4.17l-1.7,1.63l-0.38,1.17l2.81,1.67l9.4,2.78l4.46,2.45l4.79,5.82l-7.02,3.93l-11.2,3.85l-5.8,-0.48l-1.48,-0.79l-3.08,0.2l-12.71,5.8l-3.21,-2.31l-4.26,-0.97l-30.8,1.61l-3.61,-0.98l-7.47,-13.29l-2.94,-2.39l-4.06,-6.53l-0.41,-14.93l1.66,-16.04l2.01,-9.53l4.64,-9.47l5.62,-7.52l6.8,-4.95l8.33,-1.8l0.08,-0.39ZM581.91,384.74l4.51,16.76l-0.11,7.48l-3.0,9.65l-3.71,7.42l-5.1,7.63l-6.07,5.9l-6.49,2.37l-6.86,1.24l-11.18,5.38l-6.15,1.28l-2.96,1.78l-4.87,7.28l-3.24,1.58l-3.78,0.39l-3.36,1.09l-6.57,3.55l1.66,12.03l-1.43,9.51l-4.71,6.71l-8.18,3.26l-15.23,0.67l-6.17,-2.58l-13.91,-11.21l-7.62,-4.27l-16.16,-6.09l-3.96,-0.54l-10.5,0.53l-4.64,-2.55l-1.57,-4.24l-0.75,-5.54l-2.22,-5.64l3.85,-2.14l6.58,-6.56l14.68,-8.02l9.9,-9.85l17.43,-7.04l10.61,-9.84l8.79,-3.67l3.2,-2.67l5.64,-14.48l1.62,-1.42l4.62,0.52l2.57,-0.47l10.27,-10.26l4.01,-2.78l13.46,-4.52l4.01,-3.22l6.27,6.75l36.83,8.82Z"
                              data-code="NL-FL" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M400.97,248.43l11.56,23.85l1.27,8.31l0.48,24.72l3.35,5.37l2.53,1.65l2.62,2.96l2.85,1.73l3.71,-2.13l2.42,-2.54l2.62,-1.35l3.09,-0.43l3.59,0.29l11.81,5.21l1.5,1.92l2.29,13.59l-7.49,3.72l-3.52,3.24l-3.14,9.39l-3.68,4.2l-14.31,8.96l-3.35,1.33l-3.08,0.52l-5.74,-5.4l-6.34,-2.43l-8.74,1.62l-3.5,6.62l0.36,9.86l3.26,11.35l7.72,17.18l1.69,9.26l-4.57,4.84l1.53,5.44l-6.17,2.35l-0.09,0.67l2.62,2.22l3.23,6.48l3.61,1.91l-1.47,3.63l-2.18,3.27l-2.41,2.18l-2.64,0.93l-2.79,3.06l-1.9,6.06l-1.88,3.55l-3.28,-2.5l-0.64,0.32l0.0,1.92l-2.37,-1.75l-3.57,-0.56l-0.46,0.4l0.0,2.6l-1.83,0.88l-1.29,1.75l0.11,0.58l14.65,9.01l3.97,1.28l10.48,0.91l4.64,1.62l11.77,8.1l4.35,1.9l5.77,0.78l9.98,-1.23l4.64,0.5l15.56,11.4l-13.6,0.12l-3.24,1.52l-4.27,7.2l-4.76,11.84l-0.81,4.51l-4.57,10.16l-4.41,3.06l-12.95,-0.7l-8.83,1.65l-4.21,1.95l-5.68,1.19l-2.5,-13.41l1.73,-7.57l3.87,-5.15l-2.26,-4.0l-2.48,-2.3l-1.66,-4.86l0.94,-1.5l7.27,-3.2l-9.82,-1.23l-3.67,1.57l-0.99,-1.49l-2.78,-1.57l-1.9,0.03l-5.74,3.19l-4.35,0.77l-2.36,-0.12l-2.0,1.48l-3.17,6.08l-9.21,1.31l-5.11,2.53l-3.59,3.7l-4.62,2.38l-10.85,3.2l-7.31,4.85l-2.14,-1.06l-0.72,-1.64l-1.01,-5.58l-2.29,-1.69l-9.55,3.1l-4.98,2.39l-9.9,2.66l-7.17,-0.14l-3.27,-2.68l-2.57,0.06l-0.27,-2.31l2.91,-5.01l1.94,-11.23l9.8,-16.38l-0.25,-0.59l-5.26,-1.27l-5.01,2.52l-4.01,-0.89l-11.15,-4.98l2.02,-3.68l14.11,-41.7l2.04,-10.92l0.01,-2.84l4.59,-9.9l9.92,-74.69l4.15,-19.08l2.87,-17.91l9.88,-25.8l2.25,-12.71l1.22,-16.42l1.72,-7.87l2.5,-3.15l14.15,2.23l2.29,-2.02l1.39,2.3l-3.42,11.7l5.49,7.41l9.84,3.04l9.3,-0.63l5.55,-3.12l9.88,-8.61l4.73,-1.76l9.41,-1.25l9.17,-4.07l23.1,-20.75l1.76,5.88l-13.38,11.86l-10.06,6.27l-9.75,4.01l-0.1,0.68l4.9,3.99ZM360.7,174.78l-0.16,2.73l0.4,0.4l4.25,0.0l-1.44,4.54l-3.05,6.01l-6.44,10.02l-11.06,9.21l-5.2,10.13l-7.58,2.22l-7.93,-3.28l-4.38,-9.61l1.43,-10.03l4.6,-11.43l5.74,-9.36l11.12,-9.66l5.49,-11.67l5.76,-9.45l6.83,0.38l0.83,2.02l0.52,1.92l-0.16,1.7l-1.25,2.17l3.28,5.38l2.37,6.82l-0.06,5.88l-3.89,2.94Z"
                              data-code="NL-NH" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M172.91,807.07l3.54,4.8l5.78,1.77l12.2,-1.66l4.82,2.35l4.53,-1.49l7.55,0.38l2.28,-0.61l0.98,5.12l-1.5,3.99l1.05,11.56l2.27,2.06l1.05,4.52l-4.07,-0.15l-0.72,-0.88l-1.84,-4.29l-0.96,-11.29l-2.53,-1.95l-0.55,0.08l-2.65,3.46l-4.96,1.49l-20.9,-0.62l-4.75,-1.57l-4.64,-2.85l-12.97,-11.29l-3.93,-1.6l-9.78,-1.01l-3.62,2.25l-6.93,13.14l-2.59,3.79l-3.45,1.82l-8.33,0.92l-3.11,1.95l-2.31,0.39l-2.32,-1.04l-6.47,-6.81l-14.02,-6.95l-9.34,-8.91l-3.87,-0.36l-9.61,3.6l-5.14,0.23l-13.15,-3.0l-4.07,-2.22l-9.45,-15.57l-7.71,-6.84l-2.46,-3.9l-0.9,-5.84l2.32,-3.24l23.91,-14.82l62.62,-6.76l5.07,0.68l3.4,1.96l3.71,3.46l3.27,4.58l2.01,5.05l-2.14,0.88l-5.6,4.17l-0.13,2.63l0.36,0.4l22.31,2.35l11.28,4.58l9.52,8.33l3.06,5.77l4.58,12.95ZM208.53,776.39l-2.7,7.06l-7.96,-1.45l-9.75,-4.33l-3.67,-0.31l-7.35,0.89l-3.38,-0.56l-5.52,-3.32l-18.02,-16.99l11.82,-5.65l6.13,-1.72l20.79,1.04l6.0,1.85l5.26,4.46l7.08,8.55l1.59,4.65l-0.31,5.83ZM35.15,888.07l-10.73,1.68l-7.37,-0.89l-6.96,-3.2l-5.56,-6.12l-3.25,-9.24l0.16,-8.63l0.96,-9.38l-1.95,-13.91l37.53,-12.23l3.55,-2.85l3.39,-0.41l14.76,9.6l22.7,6.52l7.45,6.62l5.07,2.2l9.54,0.03l8.86,2.54l5.94,-0.83l22.84,-9.85l3.38,-4.02l1.22,-7.39l2.06,-3.07l4.77,0.26l5.34,2.06l3.26,2.06l4.08,8.08l2.16,2.35l2.85,1.03l5.53,0.76l2.26,1.86l1.6,0.66l8.55,0.53l4.01,-6.02l1.32,-1.24l4.3,0.49l4.68,2.75l-1.82,9.95l-1.28,3.63l-9.15,12.53l-11.51,9.08l-28.94,14.64l-10.67,8.37l-5.11,1.66l-27.53,0.35l-2.74,-1.24l-3.34,-3.96l-0.35,-3.74l0.35,-4.24l-1.38,-5.14l-4.52,-2.96l-28.59,-9.54l-6.02,-0.96l-5.95,0.33l-16.67,3.28l-2.65,2.88l-0.43,4.42l0.58,4.67l-0.6,3.19ZM195.51,746.68l-8.91,-0.15l-2.38,-0.93l-2.26,-1.54l-1.77,-2.16l-1.6,-5.87l4.24,-3.87l4.9,1.92l5.26,3.8l4.9,1.89l-2.38,6.92ZM155.51,715.54l2.62,4.01l2.42,2.04l9.84,2.81l4.21,3.01l0.44,5.76l-2.3,3.62l-3.7,2.61l-4.1,1.57l-17.87,3.51l-4.02,-0.19l-8.6,-3.21l-4.91,-3.49l-3.8,-9.99l-3.8,-2.98l-9.1,-3.67l-2.98,-3.5l-2.21,-1.69l-3.46,-0.11l-6.97,8.05l-10.25,0.59l-4.61,-1.36l-3.0,-4.33l0.65,-11.85l8.28,-5.4l20.57,-3.2l3.65,0.34l3.21,1.73l22.33,0.62l5.08,1.1l3.69,2.88l8.7,10.72Z"
                              data-code="NL-ZE" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M331.6,518.78l2.85,5.02l2.63,3.13l5.22,2.11l10.98,9.46l-1.87,1.83l2.78,9.65l-0.38,1.18l-0.71,0.2l-6.37,-2.97l-1.64,0.22l-1.29,0.48l-7.0,7.55l0.04,0.57l3.23,2.83l3.47,1.3l2.92,13.96l10.22,0.39l-1.22,1.88l-9.26,4.68l-7.42,11.34l1.43,3.03l10.33,-1.4l0.9,3.95l-5.85,2.95l-0.97,1.3l2.09,4.03l7.5,9.62l5.14,7.91l0.67,-0.0l1.43,-2.22l5.07,0.3l2.53,-1.01l6.66,-6.84l7.89,-4.82l9.7,2.14l2.51,-1.16l3.36,-4.32l1.98,-1.53l5.26,-1.45l4.19,-2.67l3.0,0.66l2.72,2.13l3.19,5.56l2.23,2.8l4.53,2.46l1.84,0.31l-5.58,11.5l-9.29,16.57l0.78,4.06l-0.16,1.67l-2.27,1.44l-17.86,7.57l-6.69,0.41l-0.31,0.62l1.42,2.18l-0.65,3.72l0.26,3.26l-5.1,0.48l-11.82,-2.39l-6.12,0.09l-9.24,8.29l-5.67,1.81l-13.06,0.28l-6.69,5.16l-5.15,5.57l-3.39,6.67l-11.56,13.99l-7.31,0.11l-5.47,1.66l-9.61,4.63l-8.04,2.43l-8.86,0.27l-24.14,-4.9l-7.49,13.21l-9.0,6.18l-12.41,3.24l-9.7,0.83l-9.53,3.15l-5.07,-1.95l-5.17,-3.75l-5.26,-2.07l-4.49,3.62l-0.13,-4.75l0.67,-3.03l2.89,-3.21l3.92,-1.62l7.89,-0.68l0.25,-0.68l-2.53,-2.62l-6.02,-4.29l-16.14,-4.95l-3.23,-4.76l-1.51,-12.58l-3.91,-7.83l-5.79,-5.33l-7.11,-4.56l-4.35,3.3l-5.82,1.8l-6.05,-0.0l-4.57,1.29l-1.03,1.57l-3.29,0.19l-2.05,-9.93l6.54,-4.43l14.6,-4.48l2.1,-2.74l4.31,-0.31l7.69,1.75l7.56,3.75l1.99,-0.24l2.4,-1.08l2.96,-2.5l-1.71,-4.02l-5.96,-8.24l-2.86,-2.79l-0.5,-2.19l0.48,-2.82l2.7,-4.98l-0.79,-5.88l-4.47,-14.9l-2.53,-6.23l1.23,-2.7l1.42,-2.27l10.61,2.37l9.21,-1.49l8.21,-5.36l33.47,-40.85l28.55,-42.14l21.34,-38.87l11.27,5.03l4.24,0.95l5.0,-2.52l4.58,1.1l-9.58,16.02l-1.97,11.3l-2.9,4.96l0.27,3.07l0.43,0.35l2.47,-0.18l3.5,2.76l7.44,0.16l10.08,-2.7l5.01,-2.4l9.33,-3.03l1.47,1.14l0.99,5.5l0.82,1.9l2.67,1.42l7.44,-4.72Z"
                              data-code="NL-ZH" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M822.19,48.89l8.1,32.49l6.73,4.49l4.55,5.62l7.33,2.44l9.28,5.32l4.22,-1.24l2.03,2.19l2.99,0.73l2.78,-0.77l2.08,-2.21l1.02,0.0l0.0,2.09l-2.8,2.98l0.07,1.82l1.14,3.22l0.69,6.59l7.2,4.12l16.89,4.38l2.35,0.05l0.75,16.85l-0.73,6.04l-1.57,6.65l-3.29,8.56l-0.61,3.3l0.19,4.79l2.03,4.54l0.82,3.28l2.17,27.82l-0.36,13.89l-2.13,12.31l-5.05,12.92l-19.18,30.29l-1.54,4.33l-5.19,-6.87l-2.55,-2.05l-4.26,-1.49l4.8,-12.61l-0.16,-3.42l-1.81,-0.67l-11.36,-14.24l-10.95,-14.88l-17.17,-18.18l-9.97,-9.71l-18.44,-20.15l-1.4,-1.02l-2.41,-1.28l-6.4,-0.57l-15.41,5.11l-3.24,-7.12l-7.97,-10.72l-4.44,-3.12l-3.77,-6.67l-4.01,-5.5l-2.81,0.15l-12.34,-5.39l-8.46,7.66l-4.33,2.76l-6.72,7.79l-2.43,6.77l-2.94,6.23l-1.93,6.41l-3.69,6.68l-1.6,0.94l-4.61,-1.48l-10.48,-6.69l-4.12,-1.47l-9.94,-0.96l-1.91,-0.62l-3.0,-2.72l-2.09,-2.69l-1.07,-8.19l1.61,-8.27l2.35,-4.74l8.65,-11.59l0.67,-1.67l-1.83,-7.91l6.3,-11.64l2.03,-6.79l7.82,-8.33l-0.25,-0.78l-2.31,-1.21l0.64,-8.65l-0.4,-2.17l-0.89,-1.44l-4.68,-1.64l-3.62,1.56l-1.13,-0.13l-4.81,-4.85l-7.64,-2.7l-2.21,-8.24l1.12,-4.58l2.41,-4.83l20.26,-0.64l2.27,0.8l4.18,3.69l2.52,0.83l2.13,-0.73l5.91,-4.63l34.7,-10.19l55.05,-8.59l23.02,3.94l4.68,2.16l3.86,4.05ZM726.25,0.42l11.39,5.07l-1.43,1.42l-0.48,1.24l-7.94,-2.69l-3.94,-2.48l-0.34,-2.06l2.74,-0.5Z"
                              data-code="NL-GR" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M736.92,142.7l4.29,1.84l2.52,-0.26l3.83,5.26l3.79,6.71l4.49,3.18l7.92,10.64l3.37,7.37l16.11,-5.01l6.07,0.57l3.41,2.08l18.41,20.13l9.98,9.72l17.15,18.15l10.91,14.83l11.46,14.37l1.61,0.46l0.13,2.79l-4.92,12.94l0.24,0.52l4.59,1.6l2.34,1.91l5.38,7.26l-2.31,6.58l-2.05,12.97l-2.18,41.7l-1.69,13.5l-4.07,7.88l-11.51,-4.01l-11.67,1.69l-12.42,-3.75l-22.32,0.36l-7.83,2.45l-4.16,3.01l-2.08,-1.28l-0.52,-6.04l-2.27,-2.21l-16.97,-7.82l-3.2,-0.14l-7.03,1.28l-11.38,5.96l-3.02,3.19l-0.61,2.09l0.65,10.78l-9.06,-4.4l-1.52,-0.29l-1.82,-0.01l-3.07,2.34l-1.14,0.13l-1.06,-0.51l-2.05,-2.73l-1.42,-0.64l-3.13,2.01l-5.35,1.66l-1.41,-0.02l-0.72,-0.32l-2.07,-5.55l-1.93,-2.91l-7.65,-7.11l-2.04,-3.09l-12.17,-0.05l-1.84,-0.64l-7.18,-4.97l-3.78,-1.44l-2.04,0.5l-3.09,2.33l-1.21,0.07l-2.61,-1.2l-2.14,-3.38l-1.14,-0.96l-7.99,-20.99l2.1,-3.66l6.16,-3.04l8.46,-8.39l1.15,-3.46l-2.22,-3.72l-4.23,-4.43l-11.48,-13.84l19.49,-15.06l7.86,-9.06l4.01,-3.54l6.04,-0.02l5.11,1.33l8.22,5.31l11.18,-7.54l1.57,-1.71l6.43,-10.65l1.03,-4.25l-2.87,-5.99l-12.61,-17.0l-2.11,-8.12l0.2,-2.19l-1.13,-3.37l-6.78,-3.02l-3.6,-2.15l-0.56,-0.56l0.38,-4.62l4.34,1.4l2.32,-1.27l3.77,-6.82l1.95,-6.46l2.93,-6.21l2.42,-6.74l6.54,-7.55l4.3,-2.74l8.28,-7.5l7.49,3.56Z"
                              data-code="NL-DR" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M196.27,746.94l2.44,-7.09l9.43,-3.12l9.66,-0.83l12.64,-3.33l9.26,-6.41l6.96,-12.84l23.89,4.85l9.06,-0.27l8.22,-2.47l9.67,-4.65l5.33,-1.61l7.33,-0.1l12.01,-14.31l3.37,-6.64l5.04,-5.46l6.56,-5.06l12.75,-0.19l5.93,-1.88l9.07,-8.23l5.83,-0.09l11.84,2.4l5.26,-0.48l0.72,5.03l3.72,4.07l8.7,6.7l5.9,0.28l2.56,-0.8l8.3,5.65l-0.03,5.8l-2.58,6.11l0.24,0.53l2.25,0.74l42.93,-4.8l4.54,-2.3l4.12,-3.47l3.09,-4.94l3.18,-13.64l4.41,-2.37l9.5,0.67l4.8,-1.78l4.64,-3.48l4.26,-1.72l4.31,2.95l3.51,1.18l15.06,-2.28l10.24,2.3l1.21,1.49l3.0,7.41l2.36,1.71l4.45,1.17l16.27,11.35l24.17,1.28l4.33,2.14l-0.64,4.48l2.15,4.8l3.91,2.42l9.32,0.96l3.41,2.76l3.09,13.47l3.57,4.06l-1.43,3.77l1.29,2.06l2.31,1.42l2.03,2.05l4.55,7.66l1.24,3.01l2.85,11.15l1.38,3.15l-0.04,2.77l-3.26,2.9l-5.44,-3.77l-2.64,-0.65l-11.44,3.95l-6.24,1.04l-2.66,-0.04l-8.96,-3.03l-8.39,-0.84l-0.44,0.46l3.62,23.66l5.31,21.53l8.03,11.17l5.54,11.85l-13.59,11.28l-7.16,1.84l-39.56,12.4l-4.99,6.47l-5.74,9.91l-2.15,12.64l-1.26,2.54l-1.54,1.73l-1.57,0.69l-2.08,-0.17l-9.32,3.16l-1.19,-1.03l-0.73,-8.33l-1.77,-7.45l-4.34,-5.68l-5.72,-3.63l-5.31,-0.54l-4.66,2.27l-9.77,6.88l-4.75,1.77l-27.6,-1.16l-8.84,2.19l-3.71,-0.94l-0.13,-13.0l-4.18,-5.46l-4.68,-0.6l-8.9,0.78l-3.82,-2.14l-4.72,-13.8l-8.09,-8.99l-1.42,-3.52l0.81,-7.93l2.64,-6.06l0.79,-6.48l-4.62,-8.82l-8.1,-5.73l-3.85,1.11l-1.47,2.38l-2.39,8.02l-3.59,6.04l-5.37,7.26l-5.8,5.68l-4.81,1.33l-8.91,-4.12l-4.38,-1.19l-16.36,-0.57l-4.55,-1.98l1.15,-3.91l2.26,-0.33l10.1,4.7l0.56,-0.46l-1.68,-6.42l2.48,-10.93l-0.5,-5.8l-2.59,-3.48l-3.93,-2.6l-4.33,-1.65l-3.7,-0.31l-7.84,4.1l-18.06,22.24l-2.33,1.74l-3.02,1.16l-3.51,0.22l-7.41,-1.88l-6.85,1.24l-2.94,-0.28l-4.18,-3.02l0.38,-3.37l2.0,-4.76l0.31,-6.28l-1.9,-3.35l-3.37,-0.75l-6.91,1.16l-12.69,4.67l-12.23,7.19l-0.09,0.62l2.69,2.94l-0.44,2.46l-1.53,3.02l-0.13,4.01l1.86,3.44l5.22,6.2l1.35,3.53l-1.11,6.14l-4.16,2.23l-10.73,-0.7l-4.45,-1.52l-8.4,-4.61l-1.87,-0.1l-1.15,-4.92l-2.21,-1.94l-1.03,-11.25l1.51,-4.06l-1.02,-5.33l4.46,-1.4l3.15,-8.55l-1.91,-8.36l-5.06,-6.33l-6.52,-3.82l-1.87,-0.35l2.67,-7.01l0.31,-6.21l-1.68,-4.86l-6.89,-8.12l-1.16,-7.48l-2.96,-2.84l-0.67,-0.13Z"
                              data-code="NL-NB" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                              <path d="M531.84,1032.73l16.68,-18.71l5.33,-2.03l1.32,-1.04l3.04,-4.63l4.04,-8.61l2.66,-4.51l-0.14,-0.55l-2.44,-1.42l-2.39,-0.04l-4.22,1.15l8.66,-13.89l3.74,-9.14l-3.13,-4.57l0.53,-4.72l1.13,-3.44l1.54,-0.96l2.51,2.15l0.58,-0.07l1.8,-2.45l3.05,-7.82l-1.47,-4.99l4.71,-0.2l4.58,-2.48l0.07,-0.6l-5.16,-5.57l0.69,-3.92l3.27,-3.59l-2.99,-6.81l-4.11,-0.32l-6.99,1.8l-2.92,-2.49l-4.85,-6.71l-3.95,-2.42l-3.27,-0.38l-9.75,2.05l-3.83,0.04l-2.41,-1.75l-2.29,-2.61l-3.18,-2.24l-13.25,-4.04l-3.26,-2.79l8.79,-2.96l2.15,0.15l1.88,-0.87l1.63,-1.83l1.4,-2.84l2.1,-12.5l5.67,-9.8l4.88,-6.32l39.24,-12.22l7.21,-1.85l14.05,-11.61l-5.58,-12.64l-7.98,-11.07l-5.28,-21.4l-3.54,-23.13l7.83,0.78l8.89,3.02l2.88,0.06l6.44,-1.07l11.35,-3.93l2.1,0.55l6.14,3.88l3.76,-3.52l0.01,-3.2l-1.38,-3.14l-2.86,-11.17l-1.28,-3.1l-4.68,-7.84l-2.1,-2.12l-2.35,-1.45l-1.0,-1.67l1.41,-3.88l-3.58,-4.0l-3.09,-13.51l-3.96,-3.23l-9.34,-0.97l-3.55,-2.24l-1.9,-4.4l0.7,-4.43l-4.65,-2.61l0.1,-4.62l1.87,-1.28l3.22,-0.44l5.71,7.35l6.75,4.8l-0.46,0.6l0.05,4.43l2.49,1.01l6.71,-0.17l2.56,1.25l7.3,6.13l-3.1,10.44l5.46,7.24l15.64,6.97l-3.89,13.49l1.03,4.81l15.62,21.61l9.38,10.87l2.77,18.97l-0.85,7.33l-1.78,8.01l-0.3,6.92l3.45,4.35l-1.28,3.17l-0.72,8.17l-1.24,4.56l-2.23,3.17l-5.9,4.12l-2.56,2.55l-11.96,22.17l-4.92,5.99l-2.41,4.16l-2.08,7.59l-0.69,8.35l1.69,7.01l5.69,3.32l11.9,-7.92l4.35,1.5l-6.5,5.07l-0.02,0.6l4.62,4.34l-3.2,4.29l-13.3,7.24l-21.62,17.03l-3.26,3.76l-4.49,9.41l-2.72,3.03l-3.97,0.43l-2.98,-2.72l-2.75,-3.6l-3.33,-1.93l-7.17,3.87l1.37,8.79l3.58,10.64l0.24,9.29l0.48,0.38l3.18,-0.65l6.14,-3.03l3.04,-0.87l3.11,0.42l6.31,2.06l8.01,-0.99l0.36,1.48l-2.3,6.26l0.33,5.37l0.72,3.18l1.86,2.05l5.52,3.49l7.34,2.56l-1.58,3.19l-0.42,2.45l1.95,7.73l-0.07,2.85l-1.37,3.66l-2.43,2.92l-5.03,-0.46l-3.64,2.06l-2.09,3.93l0.73,6.56l-1.18,4.19l-3.12,2.94l-3.31,-0.88l-0.49,0.47l1.02,4.88l1.79,3.1l2.36,1.71l1.4,2.05l-0.46,4.39l-4.38,0.82l-16.87,-0.53l-5.29,-1.68l-20.16,0.53l-2.25,-1.58l-4.75,-5.28l-2.47,-1.0l-2.58,1.76l-3.58,5.38l-2.19,0.45l-2.4,-0.49l-3.95,-2.24l2.35,-8.18l0.44,-4.45l-8.92,-3.9l-5.19,-3.63l-3.68,-5.47l-0.49,-8.03Z"
                              data-code="NL-LI" fill="#9cd2eb" fill-opacity="1" stroke="#ffffff" stroke-width="2" stroke-opacity="1" fill-rule="evenodd" class="jvectormap-region jvectormap-element" />
                            </g>
                            <g/>
                          </svg>
                        </div>
                      </div>


                    </div>


                  </article>










                </div>
                <!-- #content -->

              </div>
              <!-- #container -->

            </div>



          </div>
        </div>
      </div>

    </div>





  </div>





</body>

</html>
&#13;
&#13;
&#13;

我有一个带有区域的svg地图。单击区域后,将调用php脚本,该脚本将返回地图和有关该区域的信息。我想要点击&#34;点击&#34;区域与地图的其他部分不同。因此,我添加了一个读取url-get-VARS的jquery脚本(因为所选区域包含在get-vars中)。

有效。也就是说:它适用于使用按钮(我为测试目的而添加)。我无法使用在加载页面后执行的函数。这就是我所拥有的:

< script >
  function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
      vars[key] = value;
    });
    return vars;
  }

var prov = getUrlVars()["provid"];

jQuery(document).ready(function() {
  jQuery("path[data-code=" + prov + "]").attr("fill", "#ccc"); // This doesn't work

  jQuery("button").click(function() {.   // This works
    jQuery("path[data-code=" + prov + "]").attr("fill", "#ccc"); 
  });
});

< /script>

HTML:

<button>Click to change color of region (testing purposes)</button>

0 个答案:

没有答案