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
| /* name your links like: http://mypage.com/jump-to-block-3 or http://mypage.com/jump-to-block-6 */ | |
| /* place this in footer scripts */ | |
| $( document ).ready( function() { | |
| var $containers = $( ".row[opt-type='block']" ); | |
| for ( var i = 0, l = $containers.length, deepLink; i < l; ++i ) { | |
| deepLink = ( "op-container--" + i ); | |
| $containers.eq( i ).attr( "id", deepLink ).attr( "name", deepLink ); | |
| } |
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
| var COUNT = 100, | |
| links = [ | |
| "http://www.quranjam.com/Jam/UserImages/whale.jpg", | |
| "http://i633.photobucket.com/albums/uu56/cjay57/Creepy%20Fish/989826_f496.jpg", | |
| "http://i.dailymail.co.uk/i/pix/2012/10/24/article-2222115-15A0CDA8000005DC-378_634x426.jpg", | |
| "http://www.kidson66.com/Scout16.jpg", | |
| "https://thejesterscorner.files.wordpress.com/2012/12/scary-whale.jpeg?w=1200", | |
| "http://media.giphy.com/media/t5CTQBicJcWha/giphy.gif" | |
| ]; |
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
| $.fn.isOnScreen = function(){ | |
| var element = this.get( 0 ), | |
| bounds = element.getBoundingClientRect(); | |
| return ( ( bounds.top < window.innerHeight ) && ( bounds.bottom > 0 ) ); | |
| }; |
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
| /** | |
| * @brief OPT Parallax | |
| * @author Ray Peters <rpeters@ontraport.com> | |
| */ | |
| ;( function(){ | |
| /* Configurations */ | |
| var SETTINGS = { | |
| BLOCKS_TO_MERGE: [ 2, 3 ], | |
| BACKGROUND_IMAGE_URL: "https://i.ontraport.com/3.213.da5584f8a40b8a942445752f118aa207.JPEG" |
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
| var getDaysLeftInMonth = function(){ | |
| var now = new Date(), | |
| thisMonth = now.getMonth(), | |
| thisYear = now.getFullYear(), | |
| daysInThisMonth = new Date( thisYear, ( thisMonth + 1 ), 0 ).getDate(); | |
| return ( daysInThisMonth - now.getDate() ); | |
| }; |
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
| /** | |
| * uberGlobalize.js | |
| * @version 3.0.0 | |
| * @author Ray Peters <rpeters@ontraport.com> | |
| * | |
| */ | |
| (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
| var queueJob = function(){ | |
| var total = 0; | |
| return function( count ) { | |
| count || ( count = 1 ); | |
| for ( var i = 0; i < count; ++i ) { | |
| setTimeout( function(){ | |
| ++total; | |
| console.log( "job: ", total ); |
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
| $( document ).ready( | |
| function() { | |
| //$('*[opt-id="74478fdc-1885-0eba-36ab-4387fd0c15bb"]').hide(); | |
| //$("a[href='http://ontraport.com/fakelink']").attr('href', 'javascript:show_chapters()'); | |
| var navIsOn = false; | |
| $( document.body ).on( "click", "a[href='http://ontraport.com/fakelink']", function( ev ){ | |
| if ( navIsOn ) { | |
| hide_chapters(); | |
| navIsOn = false; |
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 separateInvalids() { | |
| var skipErrors = [ "maxFiles" ]; | |
| valids = []; | |
| invalids = []; | |
| angular.forEach(allNewFiles, function (file) { | |
| if (file.$error) { | |
| if ( skipErrors.indexOf( file.$error ) !== -1 ) return; | |
| invalids.push(file); |
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
| /** | |
| * Overlays iframes to prevent capturing mousewheels while | |
| * scrolling down a long page. Click to destroy. | |
| * | |
| * @author Ray Peters <me@raypeters.com> | |
| */ | |
| ;( function(){ | |
| $(function(){ | |
| $( "iframe" ).each( function(){ | |
| addOverlay( $( this ) ); |