Multiplication x × ×
Heavy Multiplication x ✖ ✖
Circle ○ ○
Square □ □
Pointer left ‹ ‹ ‹ \2039 \u2039
| // * iOS zooms on form element focus. This script prevents that behavior. | |
| // * <meta name="viewport" content="width=device-width,initial-scale=1"> | |
| // If you dynamically add a maximum-scale where no default exists, | |
| // the value persists on the page even after removed from viewport.content. | |
| // So if no maximum-scale is set, adds maximum-scale=10 on blur. | |
| // If maximum-scale is set, reuses that original value. | |
| // * <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,maximum-scale=1.0"> | |
| // second maximum-scale declaration will take precedence. | |
| // * Will respect original maximum-scale, if set. | |
| // * Works with int or float scale values. |
Multiplication x × ×
Heavy Multiplication x ✖ ✖
Circle ○ ○
Square □ □
Pointer left ‹ ‹ ‹ \2039 \u2039
| // https://codepen.io/tigt/post/optimizing-svgs-in-data-uris | |
| // | |
| // Function to create an optimized svg url | |
| // | |
| @function svg-url($svg){ | |
| // | |
| // Add missing namespace | |
| // | |
| @if not str-index($svg,xmlns) { |
| // https://medium.com/@primozcigler/neat-trick-for-css-object-fit-fallback-on-edge-and-other-browsers-afbc53bbb2c3 | |
| if ( ! Modernizr.objectfit ) { | |
| $('.post__image-container').each(function () { | |
| var $container = $(this), | |
| imgUrl = $container.find('img').prop('src'); | |
| if (imgUrl) { | |
| $container | |
| .css('backgroundImage', 'url(' + imgUrl + ')') | |
| .addClass('compat-object-fit'); |
| // from http://corlan.org/2012/02/15/quick-hack-to-deal-with-touch-and-mouse-events/ | |
| // not tested | |
| function init() { | |
| var el = document.getElementById('myDiv'); | |
| el.addEventListener('mousemove', onMouseMove); | |
| el.addEventListener('touchmove', onTouchMove); | |
| } | |
| function onMouseMove(e) { |
| <?php | |
| // to drop in functions.php | |
| // changes occur at line 120 | |
| add_action( 'wpcf7_init', 'wpcf7_add_shortcode_checkbox_alt' ); | |
| function wpcf7_add_shortcode_checkbox_alt() { | |
| wpcf7_add_shortcode( array( 'checkbox', 'checkbox*', 'radio' ), | |
| 'my_checkbox', true ); |
| function loadImages(container){ | |
| var $ctn = container, | |
| els = $ctn.find('.tile-background'), | |
| options = {}; | |
| options.src = 'data-src'; | |
| options.errorClass = 'lazyload--error'; | |
| options.successClass = 'lazyload--success'; | |
| els.each(function(index){ |
| <?php | |
| if ( get_post_gallery() ) : ?> | |
| <div class="gallery-wrapper"> | |
| <?php // build slider structure ?> |
| function excerpt($limit) { | |
| $excerpt = explode(' ', get_the_excerpt(), $limit); | |
| if (count($excerpt)>=$limit) { | |
| array_pop($excerpt); | |
| $excerpt = implode(" ",$excerpt).'...'; | |
| } else { | |
| $excerpt = implode(" ",$excerpt); | |
| } | |
| $excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt); | |
| return $excerpt; |
| /* | |
| By Osvaldas Valutis, www.osvaldas.info | |
| Available for use under the MIT License | |
| @example : | |
| var item = document.querySelector( '.item' ); | |
| item.classList.add( 'disappear' ); | |
| item.onCSSAnimationEnd( function() | |
| { | |
| item.parentNode.removeChild( item ); | |
| }); |