Team:Uppsala/JavaScript
From 2014.igem.org
(Difference between revisions)
Line 67: | Line 67: | ||
if (target.is('#calleft')){ | if (target.is('#calleft')){ | ||
- | document.getElementById("keke").innerHTML = '<p> | + | document.getElementById("keke").innerHTML = '<p>week0</p>'; |
+ | } | ||
+ | if (target.is('#calright')){ | ||
+ | document.getElementByld("whatnow").innerHTML = 'week 2'; | ||
} | } | ||
Revision as of 17:57, 22 August 2014
jQuery(document).ready(function() {
var button = ('.back-to-top'), timer; var offset = 500; var duration = 1000;
jQuery(window).scroll(function() { if (jQuery(this).scrollTop() > offset) { jQuery(button).fadeIn(duration); clearTimeout(timer); timer = setTimeout(function() { jQuery(button).stop(true, true).fadeOut(duration);}, 2000); } if (jQuery(this).scrollTop() < offset) { jQuery(button).fadeOut(duration); } }); jQuery(button).click(function(event) { event.preventDefault(); jQuery('html, body').animate({scrollTop: 0}, duration); return false; });
});
jQuery(document).ready(function() {
$(document).click(function(e) { var target = $(e.target);
if ((target.is('#master') || target.is('#imagediv div')) && $('.view').css("opacity") == 1) { toggleVisibility('intro'); }
});
});
jQuery(document).ready(function() {
$(document).click(function(f) { var target = $(f.target);
if (target.is('#launchDemo')){
var url = "http://xbio.cloudcontrolled.com/Java/Test.jnlp"; window.open(url,"BacterField") //deployJava.createWebStartLaunchButton(url, '1.7.0'); }
else if (target.is('#downloadDemo')){
var url = "http://xbio.cloudcontrolled.com/Java/BacterFieldDemo.jar"; window.open(url,"BacterField") //deployJava.createWebStartLaunchButton(url, '1.7.0'); }
});
});
jQuery(document).ready(function() {
$(document).click(function(f) { var target = $(f.target);
if (target.is('#calleft')){document.getElementById("keke").innerHTML = '
week0
';
} if (target.is('#calright')){ document.getElementByld("whatnow").innerHTML = 'week 2'; }
});
});