Team:Grenoble/script

From 2012.igem.org

(Difference between revisions)
 
(122 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
<script type="text/javascript">
<script type="text/javascript">
-
alert("coucou");
+
$(document).ready(
-
(function(r,o){
+
function(){
-
    var t=navigator.appVersion.match(/MSIE/i)?navigator.appVersion.replace(/.*?MSIE ([^;]+);.*/i,"$1"):null;
+
$("ul.topnav li").hover(
 +
function() {
 +
// Hover over
 +
$(this).parent().find("ul.subnav").hide();
 +
$(this).find("ul.subnav").show();
 +
// Hover out
 +
$(this).hover(
 +
function() {
 +
},
 +
function(){
 +
$(this).find("ul.subnav").hide();
 +
}
 +
);
 +
},
 +
function(){
 +
$(this).find("ul.subnav").hide();
 +
}
-
    function u(c,a){
+
);
-
var b,d={};
+
}
-
for(b in a){
+
);
-
    d[b]=a[b]
+
</script>
-
}
+
-
for(b in c){
+
-
    d[b]=c[b]
+
-
}
+
-
return d
+
-
    }
+
-
    function v(c,a){
+
<!--<script type="text/javascript">
-
return(a||o).getElementsByTagName(c)
+
$(document).ready(
-
    }
+
function(){
 +
$("ul.menu li").hover(
 +
function() {
 +
// Hover over
 +
$(this).parent().find("ul.submenu").hide();
 +
$(this).find("ul.submenu").show();
 +
// Hover out
 +
$(this).hover(
 +
function() {
 +
},
 +
function(){
 +
$(this).find("ul.submenu").hide();
 +
}
 +
);
 +
},
 +
function(){
 +
$(this).find("ul.submenu").hide();
 +
}
-
    function w(){
+
);
-
var c,a,b=r,d=o,e=d.documentElement,f=d.body;
+
}
-
if(b.innerWidth){
+
);
-
    c=b.innerWidth;
+
</script>-->
-
    a=b.innerHeight
+
-
}else if(e.clientWidth){
+
-
    c=e.clientWidth;
+
-
    a=e.clientHeight
+
-
}else{
+
-
    c=f.clientWidth;
+
-
    a=f.clientHeight
+
-
}return{'w':c,'h':a}
+
-
    }
+
-
    function x(){
+
<script type="text/javascript">
-
var c=o,a=c.documentElement,b=c.body,d,e;
+
$(document).ready(
-
e=a.scrollHeight;
+
function(){
-
d=a.scrollWidth;
+
$("ul.mini li").hover(
-
if(a.clientHeight>e){
+
function() {
-
    e=a.clientHeight
+
// Hover over
-
}
+
$(this).parent().find("ul.maxi").hide();
-
if(a.clientWidth>d){
+
$(this).find("ul.maxi").show();
-
    d=a.clientWidth
+
// Hover out
-
}
+
$(this).hover(
-
if(b.scrollHeight>e){
+
function() {
-
    e=b.scrollHeight
+
},
-
}
+
function(){
-
if(b.scrollWidth>d){
+
$(this).find("ul.maxi").hide();
-
    d=b.scrollWidth
+
}
-
}return{'w':d,'h':e}
+
);
-
    }
+
},
 +
function(){
 +
$(this).find("ul.maxi").hide();
 +
}
-
    function y(c,a,b,d){
+
);
-
if(c.addEventListener){
+
}
-
    c.addEventListener(a,b,d)
+
);
-
}else{
+
</script>
-
    c.attachEvent("on"+a,b)
+
-
        }
+
-
    }
+
-
    function s(c,a){
+
<!--<script type="text/javascript">
-
for(var b in a){
+
$(document).ready(
-
    c.style[b]=a[b]
+
function(){
-
}
+
$("demo").hover(
-
    }
+
function() {
 +
// Hover over
 +
$(this).parent().find("to_hide").hide();
 +
$(this).find("to_hide").show();
 +
// Hover out
 +
$(this).hover(
 +
function() {
 +
},
 +
function(){
 +
$(this).find("to_hide").hide();
 +
}
 +
);
 +
},
 +
function(){
 +
$(this).find("to_hide").hide();
 +
}
-
    function p(c,a){
+
);
-
a=(a==1)?0.99999:a;
+
}
-
c.style.opacity=a;
+
);
-
c.style.filter='alpha(opacity='+a*100+')';
+
</script>-->
-
c.style.MozOpacity=a;
+
-
c.style.KhtmlOpacity=a
+
-
    }
+
-
    function z(c,a,b,d){
+
<script type="text/javascript">
-
    this.elem=c||o.body;
+
function swap_div(my_div, my_object)
-
    this.to=a!==undefined?a:1;
+
{
-
    var e=this.elem.style;
+
if (document.getElementById(my_div).style.display == "none")
-
    this.from=(b===undefined?(!e.opacity&&e.opacity!==0?(this.to>0?0:1):parseFloat(e.opacity)):b);
+
{
-
    d=d||{};
+
document.getElementById(my_div).style.display = "all";
-
    this.duration=d.duration||500;
+
my_object.value = "Cacher";
-
    this.frameRate=d.frameRate||30;
+
}
-
    this.onFinish=d.onFinish;
+
else
-
    this.totalFrames=Math.ceil(this.duration/1000*this.frameRate);
+
{
-
    this.perFrame=(this.to-this.from)/this.totalFrames;
+
document.getElementById(my_div).style.display = "none";
-
    this.frameNb=0;var f=this;
+
my_object.value = "Afficher";
-
    }
+
}
 +
}
 +
</script>
-
})
 
-
(window,document);
 
-
alert("coucou");
 
-
alert("coucou");
+
<script type="text/javascript">
 +
// Méthode pour changer la visiblité d'une balise dont l'ID est passée en paramètre
 +
function toggleVisibility(tagId) {
 +
if (!document.getElementById) {
 +
msg = 'Votre navigateur est trop ancien pour profiter de votre visite\n';
 +
msg += 'Veuillez le mettre à jour ou vous en procurer un autre';
 +
return false;
 +
}
 +
var tagToToggle;
 +
try { // On tente de récupérer la balise cible dont on doit changer la visibilité
 +
tagToToggle = document.getElementById(tagId);
 +
} catch (e) { // Si échec de la récupération de la balise cible
 +
alert('Je n\'ai pas pu trouver la balise cible');
 +
}
 +
try { // Seulement pour les non IE
 +
if (tagToToggle.style.display == 'none') {
 +
tagToToggle.style.display = 'inline';
 +
} else {
 +
tagToToggle.style.display = 'none';
 +
}
 +
} catch (e) {
 +
}
 +
// Pour IE
 +
if (tagToToggle.style.visibility == 'hidden') {
 +
tagToToggle.style.visibility = 'visible';
 +
} else {
 +
tagToToggle.style.visibility = 'hidden';
 +
}
 +
}
</script>
</script>
 +
 +
</html>
</html>

Latest revision as of 00:10, 26 September 2012