Team:Valencia Biocampus/Modeling temp2

From 2014.igem.org

(Difference between revisions)
Line 5: Line 5:
<html>
<html>
 +
<script type="text/javascript">
 +
$(document).ready(function() {
 +
  // cache the id
 +
  var navbox = $('#myTab');
 +
  // activate tab on click
 +
  navbox.on('click', 'a', function (e) {
 +
      // add a hash to the URL when the user clicks on a tab
 +
      history.pushState(null, null, $(this).attr('href'));
 +
      var $this = $(this);
 +
      // prevent the Default behavior
 +
      e.preventDefault();
 +
      // set the hash to the address bar
 +
      window.location.hash = $this.attr('href');
 +
      // activate the clicked tab
 +
      $this.tab('show');
 +
      //return false;
 +
  })
 +
  // if we have a hash in the address bar
 +
  if(window.location.hash){
 +
    // show right tab on load (read hash from address bar)
 +
    $('a[href="'+window.location.hash+'"]').tab('show');
 +
  }
 +
 +
  // navigate to a tab when the history changes
 +
  window.addEventListener("popstate", function(e) {
 +
    var activeTab = $('[href=' + location.hash + ']');
 +
    if (activeTab.length) {
 +
        activeTab.tab('show');
 +
    } else {
 +
        $('.nav-tabs a:first').tab('show');
 +
    }
 +
  });
 +
});
 +
</script>
   <div class="container">
   <div class="container">
</html>
</html>
Line 44: Line 78:
   </div>
   </div>
-
<script type="text/javascript">
 
-
$(document).ready(function() {
 
-
  // cache the id
 
-
  var navbox = $('#myTab');
 
-
  // activate tab on click
 
-
  navbox.on('click', 'a', function (e) {
 
-
      // add a hash to the URL when the user clicks on a tab
 
-
      history.pushState(null, null, $(this).attr('href'));
 
-
      var $this = $(this);
 
-
      // prevent the Default behavior
 
-
      e.preventDefault();
 
-
      // set the hash to the address bar
 
-
      window.location.hash = $this.attr('href');
 
-
      // activate the clicked tab
 
-
      $this.tab('show');
 
-
      //return false;
 
-
  })
 
-
  // if we have a hash in the address bar
 
-
  if(window.location.hash){
 
-
    // show right tab on load (read hash from address bar)
 
-
    $('a[href="'+window.location.hash+'"]').tab('show');
 
-
  }
 
-
 
-
  // navigate to a tab when the history changes
 
-
  window.addEventListener("popstate", function(e) {
 
-
    var activeTab = $('[href=' + location.hash + ']');
 
-
    if (activeTab.length) {
 
-
        activeTab.tab('show');
 
-
    } else {
 
-
        $('.nav-tabs a:first').tab('show');
 
-
    }
 
-
  });
 
-
});
 
-
</script>
 
</html>
</html>

Revision as of 16:34, 29 September 2014

Modeling

Red

red red red red red red

Orange

orange orange orange orange orange

Yellow

yellow yellow yellow yellow yellow

Green

green green green green green

Blue

blue blue blue blue blue