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
// Событие mouseenter | |
$("#gallery").mouseenter(function(){ | |
$("#main").fadeOut() | |
}); | |
$("#gallery").mouseleave(function(){ | |
$("#main").fadeIn() | |
}); |
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
//Разбивает текст тайтла на два тега, оставляя в тайтле начало строки до найденного маяка /alt/ и забирает текст | |
//от маяка /alt/ в тег alt. | |
var $this = $(".portfolio-detail-inner a"); | |
$.each( $this, function () { | |
var str = $(this).attr("title"); | |
var search = str.search(/alt/); |
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
Инструкция по переносу сайта на другой хостинг и домен на CMS WordPress. | |
***Экспорт*** | |
1. Копируем себе папку "wp-content". | |
2. Экспорт базы данных делаем с помощью плагина "WP Migrate DB". | |
В своих настройках при экспорте "WP Migrate DB" предлогает заменить старые адреса сайта на те которые будут на новом домене, а так же | |
заменить путь к файлам на хостинге(http://prntscr.com/d4ib8p). Узнать путь к директории где лежит сайт на хотинге можно с помощью: | |
*создать файл phpinfo.php в него поместить функцию - <?php phpinfo(); ?>. Файл скопировать в корень сайта(не темы). Зайти |
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
//Назначаем уникальный класс с помощью цикла | |
$(".webform-datepicker").each(function(e){ | |
$(this).addClass("datepicker-" + e); | |
}); |
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 resizeAction() { | |
//add code | |
}; | |
resizeAction(); | |
$(window).resize(resizeAction); |
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
//выполнить условие при определенной ширине экрана | |
//<= '1700' это 1718px чтобы получить реальный размер нужно вычесть 18px | |
if ($(window).width() <= '1700'){ | |
//add code | |
} | |
//При каждом изменении ширины экрана запускается функция |
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
//toggle-mnu | |
html: | |
<div class="toggle-mnu" onclick="myFunction(this)"> | |
<div class="bar1"></div> | |
<div class="bar2"></div> | |
<div class="bar3"></div> | |
</div> | |
<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
var heightBody = $('body').height(); | |
var heightBlock = $('.block').height(); | |
var calc = heightBlock - heightBody; | |
var result = calc / 2; | |
$('.block') | |
.css({ | |
marginTop: result + 'px', | |
marginBottom: result + 'px' | |
}); |
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
http://mynameismatthieu.com/WOW/docs.html | |
<link rel="stylesheet" href="css/animate.css"> | |
<script src="js/wow.min.js"></script> | |
<script> | |
new WOW().init(); | |
</script> | |
<div class="wow bounceInUp" data-wow-duration="2s" data-wow-delay="5s" data-wow-offset="10" data-wow-iteration="10"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>adaptive-table</title> | |
<style> | |
/* Axiomatic CSS reset */ | |
* {margin: 0;padding: 0;border: 0;outline: 0;font-size: 100%;vertical-align: baseline;background: transparent;line-height: 1.5em;} |