Functions
Next Page: next_page_ID($id)
Previous Page: previous_page_ID($id)
$id: The ID of the page you're trying to get the next or previous page for.
Examples
| /* Flexible iFrame */ | |
| .flexible-container { | |
| position: relative; | |
| padding-bottom: 56.25%; | |
| padding-top: 30px; | |
| height: 0; | |
| overflow: hidden; | |
| } |
| var eventTimeout; // Set timeout variable | |
| /** | |
| * The function that runs the event actions | |
| */ | |
| var actualEventHandler = function () { | |
| // handle the event... | |
| }; | |
| /** |
| /** | |
| * Stop an iframe or HTML5 <video> from playing | |
| * @param {Element} element The element that contains the video | |
| */ | |
| var stopVideo = function ( element ) { | |
| var iframe = element.querySelector( 'iframe'); | |
| var video = element.querySelector( 'video' ); | |
| if ( iframe ) { | |
| var iframeSrc = iframe.src; | |
| iframe.src = iframeSrc; |
| /** | |
| * Remove whitespace from a string | |
| * @private | |
| * @param {String} string | |
| * @returns {String} | |
| */ | |
| var trim = function ( string ) { | |
| return string.replace(/^\s+|\s+$/g, ''); | |
| }; |
| /* The class that applies the animation. */ | |
| .spinner { | |
| display: inline-block; | |
| @include prefixer(animation, spin 2s infinite linear, webkit moz ms o spec); | |
| } | |
| /* The vendor-specific and generic animation keyframes. | |
| * These control the direction and nature of the animation. */ |
Functions
Next Page: next_page_ID($id)
Previous Page: previous_page_ID($id)
$id: The ID of the page you're trying to get the next or previous page for.
Examples
| <?php | |
| function some_name( array $options = array() ) { | |
| // Set defaults for all passed options | |
| $options = array_merge( array( | |
| 'property1' => 'default1', | |
| 'property2' => 'default2', | |
| ), $options); | |
| } |
| /** | |
| * A simple forEach() implementation for Arrays, Objects and NodeLists | |
| * @private | |
| * @param {Array|Object|NodeList} collection Collection of items to iterate | |
| * @param {Function} callback Callback function for each iteration | |
| * @param {Array|Object|NodeList} scope Object/NodeList/Array that forEach is iterating over (aka `this`) | |
| */ | |
| var forEach = function (collection, callback, scope) { | |
| if (Object.prototype.toString.call(collection) === '[object Object]') { | |
| for (var prop in collection) { |
| // Event selector defaults | |
| var toggles; // Toggle nodes list | |
| var eventListeners = []; //Listeners array | |
| // Whenever a toggle is clicked, run the function | |
| toggles = document.querySelectorAll('[data-collapse]'); // Get all collapse toggles | |
| forEach(toggles, function (toggle, index) { | |
| eventListeners[index] = exports.FUNCTION.bind( null, VARIABLES ); | |
| toggle.addEventListener('click', eventListeners[index], false); | |
| }); |
| /* | |
| * jQuery Boilerplate - v3.3.2 | |
| * A jump-start for jQuery plugins development. | |
| * http://jqueryboilerplate.com | |
| * | |
| * Made by Zeno Rocha | |
| * Under MIT License | |
| */ | |
| // the semi-colon before function invocation is a safety net against concatenated |