Template:Team:HokkaidoU Japan/Book/JS

From 2014.igem.org

(Difference between revisions)
 
(12 intermediate revisions not shown)
Line 674: Line 674:
case 'middle':
case 'middle':
/*
/*
-
<div class="bb-page" style="z-index:101;">
+
<div class="bb-page" style="z-index:103;">
<div class="bb-front">
<div class="bb-front">
<div class="bb-outer">
<div class="bb-outer">
Line 697: Line 697:
</div>
</div>
*/
*/
-
$side = $('<div class="bb-page"><div class="bb-front"><div class="bb-outer"><div class="bb-content"><div class="bb-inner">' + (dir === 'next' ? this.$current.html() : this.$nextItem.html()) + '</div></div><div class="bb-flipoverlay"></div></div></div><div class="bb-back"><div class="bb-outer"><div class="bb-content" style="width:' + this.elWidth + 'px"><div class="bb-inner">' + ( dir === 'next' ? this.$nextItem.html() : this.$current.html() ) + '</div></div><div class="bb-flipoverlay"></div></div></div></div>').css( 'z-index', 101 );
+
$side = $('<div class="bb-page"><div class="bb-front"><div class="bb-outer"><div class="bb-content"><div class="bb-inner">' + (dir === 'next' ? this.$current.html() : this.$nextItem.html()) + '</div></div><div class="bb-flipoverlay"></div></div></div><div class="bb-back"><div class="bb-outer"><div class="bb-content" style="width:' + this.elWidth + 'px"><div class="bb-inner">' + ( dir === 'next' ? this.$nextItem.html() : this.$current.html() ) + '</div></div><div class="bb-flipoverlay"></div></div></div></div>').css( 'z-index', 103 );
break;
break;
case 'right':
case 'right':
Line 841: Line 841:
</script>
</script>
<script>
<script>
 +
$(function(){
var Page = (function() {
var Page = (function() {
Line 847: 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 867: Line 866:
return false;
return false;
} );
} );
 +
 +
config.$navPrev.on( 'click touchstart', function() {
config.$navPrev.on( 'click touchstart', function() {
Line 873: 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 920: Line 911:
})();
})();
Page.init();
Page.init();
 +
 +
});
 +
</script>
</script>
</html>
</html>

Latest revision as of 14:06, 15 October 2014