Created
          September 27, 2013 18:50 
        
      - 
      
- 
        Save thomsbg/6733412 to your computer and use it in GitHub Desktop. 
    goTo function
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function goTo(page) { | |
| var callback = function(e, adMarkup) { | |
| if (page < bb.current) { | |
| // Insert AFTER the requested page, if moving backwards | |
| page += 1; | |
| } | |
| insertAdBeforePage(adMarkup, page); | |
| }; | |
| $(document).on('renderTentpoleFeatureAd', callback); | |
| $(document).trigger('tentpoleFeaturePageFlip', pagesSeen, bb.current, page); | |
| $(document).off('renderTentpoleFeatureAd', callback); | |
| bb.jump(page); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment