Difference between revisions of "Team:CCA SanDiego"

Line 5: Line 5:
 
<script src="https://static.igem.org/mediawiki/2015/4/47/Cca_sanDiego_bootstrap.txt"></script>
 
<script src="https://static.igem.org/mediawiki/2015/4/47/Cca_sanDiego_bootstrap.txt"></script>
 
<script>
 
<script>
function scrollToID(id, speed){
+
 
var offSet = 0;
+
var targetOffset = jQuery(id).offset().top - offSet;
+
var mainNav = jQuery('#main-nav');
+
jQuery('html,body').animate({scrollTop:targetOffset}, speed);
+
if (mainNav.hasClass("open")) {
+
mainNav.css("height", "1px").removeClass("in").addClass("collapse");
+
mainNav.removeClass("open");
+
}
+
}
+
  
  
Line 33: Line 24:
 
}
 
}
 
);
 
);
 
+
function scrollToID(id, speed){
 +
var offSet = 0;
 +
var targetOffset = jQuery(id).offset().top - offSet;
 +
var mainNav = jQuery('#main-nav');
 +
jQuery('html,body').animate({scrollTop:targetOffset}, speed);
 +
if (mainNav.hasClass("open")) {
 +
mainNav.css("height", "1px").removeClass("in").addClass("collapse");
 +
mainNav.removeClass("open");
 +
}
 +
}
 
</script>
 
</script>
 
<style>
 
<style>

Revision as of 00:37, 4 September 2015