Gifu/head

From 2014.igem.org

(Difference between revisions)
Line 14: Line 14:
</style>
</style>
<script type="text/javascript">
<script type="text/javascript">
-
function changeMapImage(imgPath) {
+
$(function(){
-
   document.getElementById('map').src = imgPath;
+
   $("area").hover(on, off);
-
}
+
  function on(){
 +
    $('img#map').attr(
 +
        src: $('img#map').attr('src').replace(/^(.+?)(¥.(gif|jpg|jpeg|xbm|png))$/,"$1_f2$2")
 +
    });
 +
  }
 +
  function off(){
 +
    $('img#map').attr(
 +
      src: $('img#map').attr('src').replace(/^(.+?)(?:-on)?(¥.(gif|jpg|jpeg|xbm|png))$/,"$1$2")
 +
    });
 +
  }
 +
});
</script>
</script>

Revision as of 03:11, 31 August 2014

head home team project note result more