Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author sevenspark

    (@sevenspark)

    Hi dribgib,

    You get that error because you have modified the shiftnav.min.js file, and created a syntax error with your customization

    View post on imgur.com

    You commented out the first half of an if() statement and left the else{}, which naturally is going to break the script.

    //If the ShiftNav panel is too short to scroll, prevent scrolling entirely
    //Check here because panel height can change when submenus are expanded
    // if( viewport_height >= $scrollPanel[0].scrollHeight){
    // 	scrollprevented = true;
    // 	e.preventDefault();
    // }
    //If at top of scroll panel, prevent scrolling up
    else if( e.currentTarget.scrollTop === 0 ){
    	cur_y = e.originalEvent.changedTouches[0].pageY;
    	if( cur_y > start_y ){
    		//console.log( 'TOP | scrolling up' );
    		scrollprevented = true;
    		e.preventDefault();
    	}
    }

    You should restore the file to the one that is distributed with the plugin. The version distributed with the plugin does not contain any syntax errors.

    If you don’t want that section of code to run, simply disable the Swipe Open and Swipe Close settings in the Control Panel.

    Best,

    Chris

    Thread Starter TamerDesigns

    (@dribgib)

    Thank you – wow I dont’ remember modifying the core – I never do this. Really strange but that fixed it thanks!

    Plugin Author sevenspark

    (@sevenspark)

    You’re welcome, glad it helped! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unexpected Token – Console error’ is closed to new replies.