File tree Expand file tree Collapse file tree 5 files changed +9
-13
lines changed
Expand file tree Collapse file tree 5 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,11 @@ module.exports = function(grunt) {
2525 } ,
2626 files : {
2727 "Resources/Public/JavaScript/allScripts.js" : [
28- 'Resources/Private/JavaScript/modernizrCustom.js' ,
2928 'Resources/Private/JavaScript/js.cookie.js' ,
3029 'Resources/Private/JavaScript/dfgviewerSru.js' ,
3130 'Resources/Private/JavaScript/dfgviewerScripts.js' ,
3231 ] ,
3332 "Resources/Public/JavaScript/webScripts.js" : [
34- 'Resources/Private/JavaScript/modernizrCustom.js' ,
3533 'Resources/Public/JavaScript/Highlight/highlight.pack.js' ,
3634 'Resources/Private/JavaScript/websiteScripts.js' ,
3735 ] ,
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ $(document).ready(function() {
4141 }
4242 var mobileEvent = mobileCheck ( ) ? 'touchend' : 'click' ;
4343
44+ function touchSupport ( ) {
45+ return 'ontouchstart' in window || navigator . maxTouchPoints ; // Check for touch support
46+ }
47+
4448 // menu toggles for offcanvas toc and metadata
4549 $ ( '.offcanvas-toggle' ) . on ( mobileEvent , function ( event ) {
4650 $ ( this ) . parent ( ) . toggleClass ( 'open' ) ;
@@ -182,7 +186,7 @@ $(document).ready(function() {
182186 } ) ;
183187
184188 // Complex page turning mechanism and check if a click on page control was made and unfold next/back navigation
185- if ( Modernizr . touchevents ) {
189+ if ( touchSupport ( ) ) {
186190 $ ( '.fwds, .backs' )
187191 . on ( 'touchstart' , function ( ) {
188192 $ ( this ) . addClass ( 'over' ) . siblings ( '[class$=' + $ ( this ) . attr ( 'class' ) . split ( ' ' ) [ 0 ] . slice ( 1 ) + ']' ) . addClass ( 'over' ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments