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
| //html | |
| <p id="time"></p> | |
| //js | |
| let countDownDate = new Date("May 17, 2019 16:00:00").getTime(); | |
| let x = setInterval(function() { | |
| let now = new Date().getTime(); | |
| let distance = countDownDate - now; | |
| let days = Math.floor(distance / (1000 * 60 * 60 * 24)); | |
| let hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); |
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
| //jQuery | |
| $('.phoneMask').inputmask("+38 (999) 999-99-99"); | |
| //snippet MODX name: phoneValid | |
| <?php | |
| $success = true; | |
| $value = trim($value); | |
| if (!preg_match('/[+]38 [(][0-9]{3}[)] [0-9]{3}[-][0-9]{2}[-][0-9]{2}/', $value)) { | |
| $success = false; | |
| $validator->addError($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
| var owl=$(".product-carousel"); | |
| owl.owlCarousel(); | |
| //$(".next") - находим нашу кнопку | |
| $(".next").click(function(){ | |
| owl.trigger("next.owl.carousel"); | |
| }); | |
| $(".prev").click(function(){ | |
| owl.trigger("prev.owl.carousel"); | |
| }); |
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
| [[!FormIt? | |
| &hooks=`recaptchav2,email` | |
| &emailTpl=`sendEmail` | |
| &emailSubject=`test` | |
| &emailTo=`xxxxxxxxx@xxxxxxxxx` | |
| &emailFrom=`xxxxxxxxxxx@xxxxxxxxxxx` | |
| &redirectTo=`2` | |
| &customValidators=`validFile,validPhone` | |
| &validate=`name:required, | |
| email:email:required, |
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
| html | |
| <a href="#" rel="external">link</a> | |
| js | |
| $('a[rel=external]').attr('target','_blank'); |
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
| JS: | |
| $(".accordeon dd").hide().prev().click(function() { | |
| $(this).parents(".accordeon").find("dd").not(this).slideUp().prev().removeClass("active"); | |
| $(this).next().not(":visible").slideDown().prev().addClass("active"); | |
| }); | |
| CSS: | |
| .accordeon .active { color: red } | |
| HTML: |
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 | |
| $method = $_SERVER['REQUEST_METHOD']; | |
| //Script Foreach | |
| $c = true; | |
| if ( $method === 'POST' ) { | |
| $project_name = trim($_POST["project_name"]); | |
| $admin_email = trim($_POST["admin_email"]); |
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
| HTML: | |
| <div class="wrapper"> | |
| <div class="tabs"> | |
| <span class="tab">Вкладка 1</span> | |
| <span class="tab">Вкладка 2</span> | |
| <span class="tab">Вкладка 3</span> | |
| </div> | |
| <div class="tab_content"> | |
| <div class="tab_item">Содержимое 1</div> | |
| <div class="tab_item">Содержимое 2</div> |
NewerOlder