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
| // Меняем фон у картинки при наведении на меню | |
| $(".mainmenu_right li").hover(function () { // задаем функцию при наведении курсора на элемент | |
| $(".main_header").css("background-image", "url('../img/header_bg_1.jpg')"); // задаем цвет заднего фона | |
| }, function () { // задаем функцию, которая срабатывает, когда указатель выходит из элемента | |
| $(".main_header").css("background-image", "url('../img/header_bg.jpg')"); // задаем цвет заднего фона | |
| }); |
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).scroll(function () { | |
| var top = $(document).scrollTop(); | |
| if (top < 600) $(".sticky_panel").removeClass('sticky_panel__active'); | |
| else $(".sticky_panel").addClass('sticky_panel__active'); | |
| }); |
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
| clip-path: polygon(50% 0%, 100% 0, 100% 90%, 50% 100%, 0 90%, 0 0) |
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
| .owner_1 | |
| clip-path: polygon(0 0%, 100% 0, 100% 87%, 0 100%) |
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
| $(".button--secondary").click(function () { | |
| var vhod = $(this).parents().eq(2).text(); //обращаемся к родителю кликнутого элемента на 2 уровня вверх | |
| console.log(vhod); | |
| $(".infoinput").val(vhod); | |
| }); |
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 replaced = $("body").html().replace('-9o0-9909','The new string'); | |
| $("body").html(replaced); |
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 | |
| $popularpost = new WP_Query( array('category_name' => 'stati', 'posts_per_page' => 3, 'meta_key' => 'wpb_post_views_count', 'orderby' => 'wpb_post_views_count', 'order' => 'DESC' ) ); | |
| while ( $popularpost->have_posts() ) : $popularpost->the_post(); | |
| the_title(); | |
| endwhile; |
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
| -webkit-filter: brightness(77%) // фильтр затемнение https://habr.com/post/155353/ |
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
| // Включаем вкладки (Эффекты slideLeft/scaleUp/flip) | |
| $(".tabs_menu li").click(function() { // Событие нажатия на элемент меню вкладок | |
| if (!$(this).hasClass("active")) { // Проверка, не нажали ли мы на уже активный пункт | |
| var i = $(this).index(); // Получаем порядковый номер нажатого пункта, отстче идет от 0 (0,1,2) | |
| $(".tabs_menu li.active").removeClass("active"); // Удаляем активный класс у прошлого пункта меню | |
| $(".tabs .active").hide().removeClass("active"); // Скрываем и удаляем активный класс у прошлого контейнера с содержимым | |
| $(this).addClass("active"); // Добавляем нажатому пункту меню активный класс | |
| $($(".tabs").children(".info")[i]).fadeIn(1000).addClass("active"); // Показываем и добавляем активный класс соответствующему контейнеру | |
| } | |
| }); |