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
| //Name jQuery Plugin | |
| //Example: | |
| (function($) { | |
| $.fn.namePlagin = function() { | |
| var settings = { | |
| }; | |
| settings = $.extend(settings, options); |
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
| form(action="mail.php").form | |
| //- Start: Hidden inputs | |
| input(type="hidden" name="project_name" value="Название сайта") | |
| //- input(type="hidden" name="admin_email" value="Почта администратора") | |
| input(type="hidden" name="admin_email" value="OlegBudkeev-Test@yandex.ru") | |
| input(type="hidden" name="form_subject" value="Тема письма. Например: Заявка с сайта olegbudkeev.ru") | |
| //- End: Hidden inputs | |
| .form__input-box | |
| input(type="text" name="Имя" placeholder="Имя" #username required).form__input | |
| .form__input-box |
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
| $(document).ready(function() { | |
| //E-mail Ajax Send | |
| $(".form").submit(function() { //Change | |
| var $th = $(this); | |
| $.ajax({ | |
| type: "POST", | |
| url: "../mail.php", //Change | |
| data: $th.serialize() | |
| }) |
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
| .form__success, .form__error | |
| display: none | |
| text-align: center | |
| margin-top: 20px | |
| padding: 20px | |
| background-color: #C5FFB9 | |
| color: #1A3814 | |
| .form__error | |
| background-color: #FFB9B9 | |
| color: #381414 |
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 addSpace(var){ | |
| return String(var).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1 ') | |
| } |
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
| // Подключение всех стилей анимации animate.css при использовании плагина scss-animate https://www.npmjs.com/package/scss-animate | |
| // Пример настроек: bounce($count: infinite, $duration: 1s, $delay: .2s, $function: ease, $fill: both, $visibility: hidden) | |
| // $count — Определяет количество повторений анимации. Чтобы анимация повторялась бесконечно, введите значение 'infinite'. По умолчанию: 1 | |
| // $duration — продолжительность анимации в секундах или миллисекундах (мс) По умолчанию: 0 | |
| // $delay — Устанавливает время начала анимации. По умолчанию: 0 | |
| // $function — вид анимации во времени. По умолчанию: ease | |
| // $fill — Указывает, как анимация CSS должна применять стили к месту назначения до и после ее запуска. По умолчанию: both | |
| // $visibility — Определяет, следует ли отображать обратную сторону элемента для пользователя. По умолчанию: hidden | |
| // INDEX OF ATTENTION SEEKERS |
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
| //Плагин scss-animate https://www.npmjs.com/package/scss-animate | |
| @include keyframes(flipInY-line) { | |
| 0% { | |
| opacity: 0; | |
| @include transform(perspective(400px) rotateY(90deg)); | |
| } | |
| 100% { | |
| opacity: 1; | |
| @include transform(perspective(400px) rotateY(0deg)); | |
| } |
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
| //Animate CSS + WayPoints javaScript Plugin | |
| //Example: $(".element").animated("zoomInUp"); | |
| //Example: $(".element").animated("zoomInUp", '70%', 'series', '300', '.elem2'); | |
| //offset, series, interval и triger можно не указывать | |
| //Значения по умолчанию: offset = 85, interval = 200, triger = перебираемые-элементы | |
| //series — включает последовательную анимацию для группы элементов | |
| (function($) { | |
| $.fn.animated = function(inEffect, offset, series, interval, triger) { | |
| var interval = interval || '200'; | |
| var offset = offset || '85%'; |
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
| //Animate CSS + WayPoints javaScript Plugin | |
| //Example: $(".element").animated("zoomInUp"); | |
| //Author URL: http://webdesign-master.ru | |
| (function($) { | |
| $.fn.animated = function(inEffect, offset) { | |
| $(this).each(function() { | |
| var ths = $(this); | |
| ths.css("opacity", "0").addClass("animated").waypoint(function(dir) { | |
| if (dir === "down") { | |
| ths.addClass(inEffect).css("opacity", "1"); |
NewerOlder