Template:Team:HokkaidoU Japan/About Us/JS

From 2014.igem.org

(Difference between revisions)
 
(177 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
<script type="text/javascript">
<script type="text/javascript">
-
 
-
(function($){
 
-
 
-
$.fn.skOuterClick = function(method) {
 
-
var methods = {
 
-
init : function (handler) {
 
-
var inners = new Array();
 
-
if (arguments.length > 1) for (i = 1; i < arguments.length; i++) {
 
-
inners.push(arguments[i]);
 
-
}
 
-
return this.each(function() {
 
-
var self = $(this);
 
-
var _this = this;
 
-
var isInner = false;
 
-
// Bind click event to suppress
 
-
function onInnerClick(e){
 
-
isInner = true;
 
-
};
 
-
self.click(onInnerClick);
 
-
for (var i = 0; i < inners.length; i++) {
 
-
inners[i].click(onInnerClick);
 
-
}
 
-
// Bind click elsewhere
 
-
$(document).click(function(e){
 
-
if (!isInner) handler.call(_this, e);
 
-
else isInner = false;
 
-
});
 
-
});
 
-
}
 
-
};
 
-
if (methods[method]) {
 
-
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
 
-
} else if (typeof method === 'function') {
 
-
return methods.init.apply(this, arguments);
 
-
} else {
 
-
$.error('Method "' + method + '" does not exist in skOuterClick plugin!');
 
-
}
 
-
};
 
-
})(jQuery);
 
Line 49: Line 10:
     });
     });
-
$(".show").click(function(){
+
$(".show").hover(function(){
     var number =$(".show").index(this);
     var number =$(".show").index(this);
-
     $(".overlay").eq(number).show(500);
+
     $(".overlay").eq(number).stop().show(500);
 +
  }, function() {
 +
    var number =$(".show").index(this);
 +
  $(".overlay").eq(number).stop().hide(500);
   });
   });
-
$(".overlay").click(function(){
 
-
      $(this).hide(500);
 
-
});
 
-
 
$(".overlay-content").click(function(e){
$(".overlay-content").click(function(e){
     e.stopPropagation();
     e.stopPropagation();
});
});
-
$(".show:li(3)").click(function(){
+
/*
-
     $(".show:gt(4)").animate({"top": "160px"}, 500);
+
$(".show").slice(2, 8).hover(function(){
 +
    $("#tori,#mami,#tamaro,#sanbon,#saitoh,#liu").stop().animate({"top": "200px"}, 500);
 +
    if( $(".member-list ul li").slice(8,14).css("top")=="200px") {
 +
    $("#shehata").animate({"top": "400px"}, 500);
 +
    } else {$("#shehata").stop().animate({"top": "200px"}, 500);
 +
};
 +
     $("#special-thanks,#itoh,#kawahata").stop(true,true).animate({"top":"200px"},500);
 +
},function(){
 +
        if( $("#tori,#mami,#tamaro,#sanbon,#saitoh,#liu").css("top")=="200px"){
 +
        $(".member-list ul li").slice(8,15).stop().animate({"top":"0px"},500);
 +
        $("#shehata").stop().animate({"top":"0px"},500);
 +
        };
 +
    $("#special-thanks,#itoh,#kawahata").stop(true,true).animate({"top":"-=200px"},500);
 +
 
});
});
 +
$(".show").slice(8, 14).hover(function(){
 +
    $("#shehata").stop().animate({"top": "200px"}, 500);
 +
    if( $("#tori").css("top")=="200px") {
 +
    $("#shehata").stop().animate({"top": "400px"}, 500);
 +
};
 +
    $("#special-thanks,#itoh,#kawahata").stop().animate({"top":"200px"},500);
 +
},function(){
 +
    if($("#tori").css("top")=="0px"){
 +
        $("#shehata").stop().animate({"top":"0px"},500);
 +
      } else {
 +
        $("#shehata").stop().animate({"top":"200px"},500);
 +
      };
 +
    $("#special-thanks,#itoh,#kawahata").stop().animate({"top":"-=200px"},500);
 +
 +
});
 +
 +
*/
 +
 +
$(function(){
 +
    $('.show').hover(function(){
 +
        $(this).attr('src', $(this).attr('src').replace('https://static.igem.org/mediawiki/2014/d/df/HokkaidoU_Member_horiguchi_off', 'https://static.igem.org/mediawiki/2014/3/38/HokkaidoU_Member_horiguchi_on'));
 +
          }, function(){
 +
            if (!$(this).hasClass('currentPage')) {
 +
            $(this).attr('src', $(this).attr('src').replace('https://static.igem.org/mediawiki/2014/3/38/HokkaidoU_Member_horiguchi_on', 'https://static.igem.org/mediawiki/2014/d/df/HokkaidoU_Member_horiguchi_off'));
 +
        }
 +
  });
 +
});
 +
 +
 +
 +
$(function(){
 +
    $('.show').hover(function(){
 +
        $(this).attr('src', $(this).attr('src').replace('https://static.igem.org/mediawiki/2014/d/d6/HokkaidoU_Member_tamaro_off', 'https://static.igem.org/mediawiki/2014/a/a8/HokkaidoU_Member_tamaro_on'));
 +
          }, function(){
 +
            if (!$(this).hasClass('currentPage')) {
 +
            $(this).attr('src', $(this).attr('src').replace('https://static.igem.org/mediawiki/2014/a/a8/HokkaidoU_Member_tamaro_on', 'https://static.igem.org/mediawiki/2014/d/d6/HokkaidoU_Member_tamaro_off'));
 +
        }
 +
  });
 +
});
 +
 +
 +
$(function(){
 +
    $('.show').hover(function(){
 +
        $(this).attr('src', $(this).attr('src').replace('https://static.igem.org/mediawiki/2014/6/60/HokkaidoU_Member_shimoyama_off', 'https://static.igem.org/mediawiki/2014/2/22/HokkaidoU_Member_shimoyama_on'));
 +
          }, function(){
 +
            if (!$(this).hasClass('currentPage')) {
 +
            $(this).attr('src', $(this).attr('src').replace('https://static.igem.org/mediawiki/2014/2/22/HokkaidoU_Member_shimoyama_on', 'https://static.igem.org/mediawiki/2014/6/60/HokkaidoU_Member_shimoyama_off'));
 +
        }
 +
  });
 +
});
 +
 +
$(function(){
 +
    $('.show').hover(function(){
 +
        $(this).attr('src', $(this).attr('src').replace('https://static.igem.org/mediawiki/2014/4/44/HokkaidoU_Member_Itoh_off', 'https://static.igem.org/mediawiki/2014/f/f5/HokkaidoU_Member_Itoh_on'));
 +
          }, function(){
 +
            if (!$(this).hasClass('currentPage')) {
 +
            $(this).attr('src', $(this).attr('src').replace('https://static.igem.org/mediawiki/2014/f/f5/HokkaidoU_Member_Itoh_on', 'https://static.igem.org/mediawiki/2014/4/44/HokkaidoU_Member_Itoh_off'));
 +
        }
 +
  });
 +
});
</script>
</script>
</html>
</html>

Latest revision as of 21:05, 17 October 2014