Skip to content
This repository was archived by the owner on Aug 28, 2018. It is now read-only.

Commit 43a5bc0

Browse files
committed
fixing touch interactions on bookSelect
1 parent 7fb8b35 commit 43a5bc0

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,4 +438,5 @@ <h2>Statistics</h2>
438438
<script src="js/wayPoint.js"></script>
439439
<script src="js/keyboardShortcuts.js"></script>
440440
<script src="js/crossReferences.js"></script>
441+
<script src="js/bookSelect.js"></script>
441442
</html>

js/events-ck.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/events.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -237,23 +237,6 @@
237237
/* $(window).resize(function(){
238238
resizeWrapperToWindow();
239239
});*/
240-
$('.bookSelect a').bind( 'mousemove', 'touchmove', function(event) {
241-
var numberOfChapters = parseInt( $(this).data( 'chapters' ), 10 ),
242-
position = event.clientX - $(this).offset().left
243-
spacing = $(this).width() / numberOfChapters,
244-
chapter = Math.ceil( position / spacing );
245-
if ( isNaN( chapter ) ) {
246-
return false;
247-
}
248-
249-
if ( chapter > numberOfChapters ) {
250-
chapter = numberOfChapters;
251-
}
252-
var hrefArray = $( this ).attr( 'href' ).split( 'chapter=' ),
253-
newHref = hrefArray[0] + 'chapter=' + chapter;
254-
255-
$( this ).attr( 'href', newHref ).find('.chapter').text( chapter );
256-
});
257240
});
258241
/*function resizeWrapperToWindow() {
259242
$('body > .wrapper').css('height',$(window).height()-$('.dock').height() );

0 commit comments

Comments
 (0)