Template:Team:HokkaidoU Japan/Book/JS

From 2014.igem.org

(Difference between revisions)
 
(46 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
-
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
 
-
<script src="//ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.7.2.js"></script>
 
<script type="text/javascript">
<script type="text/javascript">
Line 841: Line 839:
} )( jQuery, window );
} )( jQuery, window );
-
 
-
 
-
 
</script>
</script>
-
<script type="text/javascript">
+
<script>
-
$(function() {
+
$(function(){
-
 
+
var Page = (function() {
-
var Page = (function() {
+
var config = {
var config = {
Line 854: Line 848:
$navNext : $( '#bb-nav-next' ),
$navNext : $( '#bb-nav-next' ),
$navPrev : $( '#bb-nav-prev' ),
$navPrev : $( '#bb-nav-prev' ),
-
$navFirst : $( '#bb-nav-first' ),
 
-
$navLast : $( '#bb-nav-last' )
 
},
},
init = function() {
init = function() {
Line 874: Line 866:
return false;
return false;
} );
} );
 +
 +
config.$navPrev.on( 'click touchstart', function() {
config.$navPrev.on( 'click touchstart', function() {
Line 880: Line 874:
} );
} );
-
config.$navFirst.on( 'click touchstart', function() {
 
-
config.$bookBlock.bookblock( 'first' );
 
-
return false;
 
-
} );
 
-
 
-
config.$navLast.on( 'click touchstart', function() {
 
-
config.$bookBlock.bookblock( 'last' );
 
-
return false;
 
-
} );
 
-
 
// add swipe events
// add swipe events
$slides.on( {
$slides.on( {
Line 926: Line 910:
})();
})();
-
 
+
Page.init();
-
+
});
});
-
 
</script>
</script>
</html>
</html>

Latest revision as of 14:06, 15 October 2014