Team:UT Dallas/page js
From 2013.igem.org
(Difference between revisions)
(16 intermediate revisions not shown) | |||
Line 15: | Line 15: | ||
{ | { | ||
$('#results').hide("slide", { direction: "right" }, 250); | $('#results').hide("slide", { direction: "right" }, 250); | ||
- | $.get("https:// | + | $.get("https://2013.igem.org/Team:UT_Dallas/"+fname+"?action=raw&ctype=text/x-wiki", function(data) { |
$('#results').html(data); | $('#results').html(data); | ||
$('#results').show("slide", { direction: "left" }, 250); | $('#results').show("slide", { direction: "left" }, 250); | ||
}); | }); | ||
+ | return false; | ||
+ | } | ||
+ | function change_color(ele) | ||
+ | { | ||
+ | $('#project_links > li').css('color','#000000'); | ||
+ | $(ele).css('color','#ff7200'); | ||
+ | } | ||
+ | var images = new Array() | ||
+ | var x=0; | ||
+ | images[0] = "https://static.igem.org/mediawiki/2013/c/c1/Glit1.png"; | ||
+ | images[1] = "https://static.igem.org/mediawiki/2013/3/3d/Glit2.png"; | ||
+ | images[2] = "https://static.igem.org/mediawiki/2013/c/c0/Glit3.png"; | ||
+ | images[3] = "https://static.igem.org/mediawiki/2013/1/1c/Glit4.png"; | ||
+ | images[4] = "https://static.igem.org/mediawiki/2013/f/f4/Glit5.png"; | ||
+ | |||
+ | var aid=''; | ||
+ | function changeImage() | ||
+ | { | ||
+ | $('#'+aid).css('background-image','url('+images[x]+')'); | ||
+ | x++; | ||
+ | |||
+ | if(x >= images.length){ | ||
+ | x = 0; | ||
+ | } | ||
+ | setTimeout("changeImage()", 200); | ||
} | } |
Latest revision as of 00:27, 16 October 2013
function show_info(res_id) { $.get('https://2013.igem.org/Team:UT_Dallas/'+res_id+'?action=raw&ctype=text/html', function(data) { $('#result_space').fadeOut('fast', function() { $('#result_space').html(data); $('#result_space').fadeIn(); });
}); return false; }
function getData(fname) {
$('#results').hide("slide", { direction: "right" }, 250); $.get("https://2013.igem.org/Team:UT_Dallas/"+fname+"?action=raw&ctype=text/x-wiki", function(data) {
$('#results').html(data); $('#results').show("slide", { direction: "left" }, 250); });
return false;
}
function change_color(ele) {
$('#project_links > li').css('color','#000000'); $(ele).css('color','#ff7200');
} var images = new Array() var x=0; images[0] = ""; images[1] = ""; images[2] = ""; images[3] = ""; images[4] = "";
var aid=; function changeImage() {
$('#'+aid).css('background-image','url('+images[x]+')'); x++;
if(x >= images.length){ x = 0; } setTimeout("changeImage()", 200);
}