Template:Team:HokkaidoU Japan/JS

From 2014.igem.org

(Difference between revisions)
 
(100 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
-
<script style="text/javascript">
+
<script src="//ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.7.2.js"></script>
 +
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
 +
<script type="text/javascript">
-
//ページ内スクロール
+
(function() {
-
     $(".menber_click").click(function () {
+
  $(function() {
-
        var i = $(".member_click").index(this)
+
     return $('#menubar.left-menu ul li:last-child').css('display', 'none');
-
         var p = $(".member_introduction").eq(i).offset().top;
+
  });
-
         $('html,body').animate({ scrollTop: p }, 'fast');
+
}).call(this);
-
        return false;
+
 
 +
$(function () {
 +
    $(".right-menu").hover(function(){
 +
         $(this).css({"opacity": "1.0"});
 +
    },function(){
 +
         $(this).css({"opacity": "0.0"});
     });
     });
 +
});
-
var Page = (function() {
+
$(function() {
-
var $grid = $( '#bb-custom-grid' );
+
$(".left-menu").css("left","0");
-
 
+
});
-
return {
+
-
init : function() {
+
-
$grid.find( 'div.bb-bookblock' ).each( function( i ) {
+
-
+
-
var $bookBlock = $( this ),
+
-
$nav = $bookBlock.next().children( 'span' ),
+
-
bb = $bookBlock.bookblock( {
+
-
speed : 600,
+
-
shadows : false
+
-
} );
+
-
+
-
// add navigation events
+
-
$nav.each( function( i ) {
+
-
$( this ).on( 'click touchstart', function( event ) {
+
-
var $dot = $( this );
+
-
$nav.removeClass( 'bb-current' );
+
-
$dot.addClass( 'bb-current' );
+
-
$bookBlock.bookblock( 'jump', i + 1 );
+
-
return false;
+
-
} );
+
-
} );
+
-
+
-
// add swipe events
+
-
$bookBlock.children().on( {
+
-
'swipeleft' : function( event ) {
+
-
$bookBlock.bookblock( 'next' );
+
-
return false;
+
-
},
+
-
'swiperight' : function( event ) {
+
-
$bookBlock.bookblock( 'prev' );
+
-
return false;
+
-
}
+
-
 
+
-
} );
+
-
+
-
} );
+
-
}
+
-
};
+
-
 
+
-
})();
+
-
 
+
-
Page.init();
+
</script>
</script>
</html>
</html>
 +
{{Team:HokkaidoU_Japan/Book/JS}}
 +
{{Team:HokkaidoU Japan/LargeDropDown/JS}}
 +
{{Team:HokkaidoU Japan/About_Us/JS}}

Latest revision as of 12:55, 17 October 2014