This file contains 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
if ('FormData' in window) { //проверяем, поддерживает ли браузер функцию FormData | |
form.preventDefault(); | |
var form = document.querySelector('form'), | |
formData = new FormData(form), | |
request = new XMLHttpRequest(); | |
request.open('POST', 'sendMail.php', true); // sendMail.php - обработчик запроса | |
request.onload = function() { |
This file contains 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 mousePosition = {x:0, y:0}; | |
document.addEventListener('mousemove', function(mouseMoveEvent){ | |
mousePosition.x = mouseMoveEvent.pageX; | |
mousePosition.y = mouseMoveEvent.pageY; | |
}, false); | |
// показ подсказки | |
window.showMessage = function(message) { |
This file contains 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 getPosition(e) { | |
var posx = 0; | |
var posy = 0; | |
if (!e) var e = window.event; | |
if (e.pageX || e.pageY) { | |
posx = e.pageX; | |
posy = e.pageY; | |
} |
This file contains 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.zoomLevel": -0.3, | |
// "editor.fontFamily": "'Inconsolata', Consolas, 'Courier New', 'Anonymous Pro', monospace", | |
// "editor.fontFamily": "'Anonymous Pro', monospace", | |
"editor.fontFamily": "'Liberation Mono', Consolas, 'Courier New', monospace", | |
"editor.fontLigatures": true, | |
"editor.tabSize": 4, | |
"workbench.colorTheme": "Atom One Dark", | |
"editor.fontSize": 17, | |
"editor.lineHeight": 24, |
This file contains 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-input-placeholder { /* Chrome/Opera/Safari */ | |
color: pink; | |
} | |
::-moz-placeholder { /* Firefox 19+ */ | |
color: pink; | |
} | |
:-ms-input-placeholder { /* IE 10+ */ | |
color: pink; | |
} | |
:-moz-placeholder { /* Firefox 18- */ |
This file contains 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
// using example | |
// | |
// div { | |
// @include _1170 { | |
// font-size: 20px; | |
// } | |
// @include _480 { | |
// font-size: 13px; | |
// } | |
// } |
This file contains 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
// load non-critical css rules, this script put in end html | |
var cb = function() { | |
var l = document.createElement('link'); l.rel = 'stylesheet'; | |
l.href = 'template_styles.min.css'; //your file | |
var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h); | |
}; | |
var raf = requestAnimationFrame || mozRequestAnimationFrame || | |
webkitRequestAnimationFrame || msRequestAnimationFrame; | |
if (raf) raf(cb); |
This file contains 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 class="b-cover__made-by"> | |
<span>SITE BY</span><a href="http://dev-postnov.ru" title="Open web-page developer" target="_blank">DEV.POSTNOV</a> | |
<style> | |
.b-cover__made-by { | |
font-size: 18px; | |
} | |
.b-cover__made-by a { | |
position: relative; | |
color: #b35d5d; | |
text-decoration: none; |
This file contains 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"> | |
<title>Document</title> | |
</head> | |
<body> | |
<style> | |
.progress-bar { |
This file contains 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
//<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script> | |
// vanilla JS | |
// init with element | |
var grid = document.querySelector('.girls-list'); | |
var msnry = new Masonry( grid, { | |
// options... | |
itemSelector: '.girls__item', |
OlderNewer