Team:Hong Kong-CUHK/js/safety.js

From 2014.igem.org

(Difference between revisions)
(Created page with "$( document ).ready(function() { $('#top-bar').load('menu.html'); $('body').scrollspy({ target: '.bs-docs-sidebar', offset: 100 }); $(window).scroll(function(){ ...")
m
Line 1: Line 1:
$( document ).ready(function() {
$( document ).ready(function() {
-
$('#top-bar').load('menu.html');
+
$('#top-bar').load('menu.html?action=raw&ctype=text/html');
$('body').scrollspy({
$('body').scrollspy({

Revision as of 04:21, 7 September 2014

$( document ).ready(function() { $('#top-bar').load('menu.html?action=raw&ctype=text/html');

$('body').scrollspy({ target: '.bs-docs-sidebar', offset: 100 });

$(window).scroll(function(){ if($(window).scrollTop() > 40) { $('#top-bar').css('opacity', 0.8); } else { $('#top-bar').css('opacity', 1.0); } }); });