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
| <input id="top" type="button" value="Scroll down (1sec)" onclick="smoothScrollTo(document.getElementById('bottom').offsetTop)"> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | |
| <input id="bottom" type="button" value="Scroll up (500ms)" onclick="smoothScrollTo(0, 500)"> | |
| <script> | |
| window.smoothScrollTo = (function () { | |
| var timer, start, factor; | |
| return function (target, duration) { |
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
| <!-- Вывод картинок в templates --> | |
| [each progress_images]<a class="foobox" rel="gallery" href="{@guid}">{@_img.large}</a>[/each] | |
| <!-- с глобальными переменными globals.php --> | |
| require ('globals.php'); | |
| $phone_number = get_option('POD NAME_OPTION NAME'); | |
| <!--Вывести опцию из админки--> | |
| get_option('POD NAME_OPTION NAME') |
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
| .flex { | |
| display: -webkit-flex; | |
| display: -webkit-box; | |
| display: -moz-flex; | |
| display: -moz-box; | |
| display: -ms-flexbox; | |
| display: -ms-flex; | |
| display: -o-flex; | |
| display: flex; | |
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 rename() { | |
| document.querySelector('selector').innerHTML = 'new name'; | |
| } | |
| document.addEventListener("DOMContentLoaded", rename); |
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
| 'use strict'; | |
| // создаем <link rel="stylesheet" href="light|dark.css"> | |
| let head = document.head, | |
| link = document.createElement('link'); | |
| link.rel = 'stylesheet'; | |
| // проверяем значение из localStorage если dark то темная тема | |
| if (localStorage.getItem('themeStyle') === 'dark') { | |
| link.href = 'dark.css'; // ссылка на темный стиль | |
| document.getElementById('switch-1').setAttribute('checked', true); // переключаем чекбокс в положение "темная тема" | |
| } |
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
| // цели Яндекс | |
| add_action( 'wp_footer', 'yandex_wp_footer' ); | |
| function yandex_wp_footer() { | |
| ?> | |
| <script type="text/javascript"> | |
| document.addEventListener( 'wpcf7mailsent', function( event ) { | |
| yaCounter00000000.reachGoal('form_send'); | |
| return true | |
| }, false ); | |
| </script> |
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
| if(window.matchMedia('(max-width: 768px)').matches){ | |
| $('.sub-menu-button').on('click',function(e){ | |
| var subMenu = $(this).next('.sub-navigation'); | |
| if(subMenu.is(':visible')){ | |
| subMenu.slideUp(); | |
| } else { | |
| subMenu.slideDown(); | |
| } | |
| return 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
| <filesMatch "\.(html|htm|js|css|pdf)$"> | |
| FileETag None | |
| <ifModule mod_headers.c> | |
| Header unset ETag | |
| Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" | |
| Header set Pragma "no-cache" | |
| Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" | |
| </ifModule> | |
| </filesMatch> |
NewerOlder