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
| <div id="js-cta-slider" class="cta__slider-wrapper swiper-container"> | |
| <div class="swiper-wrapper cta__slider"> | |
| <!-- SLIDER ITEM --> | |
| <div class="cta__slider-item swiper-slide"> | |
| <picture class="media-wrapper slide-inner"> | |
| <img src="http://deghq.com/yapp/front-labs/codepen-assets/slide-4.jpg" alt="Degordian"> | |
| </picture> | |
| </div> | |
| <!-- SLIDER ITEM --> | |
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 if( have_rows('faqs') ): ?> | |
| <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> | |
| <?php $i=1; while ( have_rows('faqs') ) : the_row(); ?> | |
| <div class="panel panel-default"> | |
| <div class="panel-heading" role="tab" id="heading-<?php echo $i; ?>"> | |
| <h2 class="panel-title"> | |
| <a data-toggle="collapse" data-parent="#accordion" href="#collapse-<?php echo $i; ?>" aria-expanded="true" aria-controls="collapseOne"> | |
| <?php the_sub_field('question'); ?> | |
| </a> | |
| </h2> |
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
| <!-- mail.php--> | |
| <?php | |
| //Принимаем постовые данные | |
| $name=$_POST['name']; | |
| $phone=$_POST['phone']; | |
| //Тут указываем, на какой ящик посылать письмо | |
| $to = "morflot88@gmail.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
| function num2str(n, text_forms) { | |
| n = Math.abs(n) % 100; var n1 = n % 10; | |
| if (n > 10 && n < 20) { return text_forms[2]; } | |
| if (n1 > 1 && n1 < 5) { return text_forms[1]; } | |
| if (n1 == 1) { return text_forms[0]; } | |
| return text_forms[2]; | |
| } |
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() { | |
| $('a[href*=#]:not([href=#])').click(function() { | |
| if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
| var target = $(this.hash); | |
| target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
| if (target.length) { | |
| $('html,body').animate({ | |
| scrollTop: target.offset().top | |
| }, 1000); | |
| 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
| #style-3::-webkit-scrollbar-track | |
| { | |
| -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); | |
| background-color: #F5F5F5; | |
| } | |
| #style-3::-webkit-scrollbar | |
| { | |
| width: 6px; | |
| background-color: #F5F5F5; |
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 isMobile = false; | |
| // проверка на размер экрана (размер я брал вроде с Bootstrap-а) | |
| $(document).ready( function() { | |
| if ($('body').width() <= 400) { | |
| isMobile = true; | |
| } | |
| // и потом если нужен код только для телефона: | |
| if (isMobile) { | |
| ... |
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 parse_url(href) { | |
| var match = href.match(/^(https?\:)\/\/(([^:\/?#]*)(?:\:([0-9]+))?)(\/[^?#]*)(\?[^#]*|)(#.*|)$/); | |
| return match && { | |
| protocol: match[1], | |
| host: match[2], | |
| hostname: match[3], | |
| port: match[4], | |
| pathname: match[5], | |
| search: match[6], | |
| hash: match[7] |
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
| $(window).load(function () { | |
| $('.b-nav-panel').on('click', function (even) { | |
| even.stopPropagation(); //запретили подъем события по дереву DOM | |
| }); | |
| }); |
NewerOlder