demo/public/vendor/smooth-scroll.js
function ( options ) {

		// Feature test before initializing
		if ( 'querySelector' in document && 'addEventListener' in window && Array.prototype.forEach ) {

			// Selectors and variables
			options = _mergeObjects( _defaults, options || {} ); // Merge user options with defaults
			var toggles = document.querySelectorAll('[data-scroll]'); // Get smooth scroll toggles

			// When a toggle is clicked, run the click handler
			Array.prototype.forEach.call(toggles, function (toggle, index) {
				toggle.addEventListener('click', animateScroll.bind( null, toggle, toggle.getAttribute('href'), options ), false);
			});

		}

	}
function ( options ) {

		// Feature test before initializing
		if ( 'querySelector' in document && 'addEventListener' in window && Array.prototype.forEach ) {

			// Selectors and variables
			options = _mergeObjects( _defaults, options || {} ); // Merge user options with defaults
			var toggles = document.querySelectorAll('[data-scroll]'); // Get smooth scroll toggles

			// When a toggle is clicked, run the click handler
			Array.prototype.forEach.call(toggles, function (toggle, index) {
				toggle.addEventListener('click', animateScroll.bind( null, toggle, toggle.getAttribute('href'), options ), false);
			});

		}

	}
function ( options ) { // Feature test before initializing if ( 'querySelector' in document && 'addEventListener' in window && Array . prototype . forEach ) { // Selectors and variables options = _mergeObjects ( _defaults , options || { } ) ; // Merge user options with defaults var toggles = document . querySelectorAll ( '[data-scroll]' ) ; // Get smooth scroll toggles // When a toggle is clicked, run the click handler Array . prototype . forEach . call ( toggles , function ( toggle , index ) { toggle . addEventListener ( 'click' , animateScroll . bind ( null , toggle , toggle . getAttribute ( 'href' ) , options ) , false ) ; } ) ; } }
Initialize Smooth Scroll Public method Runs functions
Initialize Smooth Scroll Public method Runs functions