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
| // Usage: m-0 to m-7 | |
| // Usage: p-0 to p-7 | |
| // Usage: mb-0 to mb-7 | |
| $sizeUnit: rem; | |
| $marginKey: 'm'; | |
| $paddingKey: 'p'; | |
| $separator: '-'; | |
| $sizes: ( | |
| ('0', 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
| // Returns a function, that, as long as it continues to be invoked, will not | |
| // be triggered. The function will be called after it stops being called for | |
| // N milliseconds. If `immediate` is passed, trigger the function on the | |
| // leading edge, instead of the trailing. | |
| function debounce( func, wait, immediate ) { | |
| var timeout; | |
| return function () { | |
| var context = this, | |
| args = arguments; | |
| var later = 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
| /** | |
| * Sort array of objects based on another array | |
| */ | |
| function mapOrder (array, order, key) { | |
| array.sort( function (a, b) { | |
| var A = a[key], B = b[key]; | |
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
| body .gform_wrapper .gform_footer { | |
| padding-bottom: 0; | |
| } | |
| @media screen and (min-width: 768px) { | |
| body .gform_wrapper .gform_footer { | |
| text-align: right; | |
| } | |
| } |
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
| /** | |
| * Image Sourec to Print | |
| * | |
| * Usage: | |
| * | |
| * imgPrint( $('img').attr('src') ); | |
| * | |
| * @param {string} source source of the image | |
| */ | |
| function imgSourceToPrint( source ) { |
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
| /** | |
| * Copy Text to Clipboard | |
| * | |
| * Usage: simply pass the string to copyToClipboard() funciton and it will be | |
| * copied to the clipboard | |
| * | |
| * Source: https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f | |
| */ | |
| function copyToClipboard( str ) { | |
| const el = document.createElement('textarea'); // Create a <textarea> element |
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
| <?php // Do not copy this line. | |
| /** | |
| * Remove Script Version | |
| * | |
| * This function removes the query string from the scripts and styles. | |
| * | |
| * Author: Zeshan Ahmed | |
| * Author URI: https://zeshanahmed.com/ | |
| * |
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
| <?php // do not copy this line. | |
| /** | |
| * Is External | |
| * | |
| * This function checks if the provided URL is external or not. | |
| * | |
| * Author URL: https://zeshanahmed.com/ | |
| * |