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
-------client side | |
<!DOCTYPE html> | |
<html lang="ru"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Работа с json</title> | |
<link rel="stylesheet" href="/jslibs/bootstrap/dist/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="/jslibs/bootstrap/dist/css/bootstrap-theme.min.css"> | |
</head> |
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
// набирать в консоли | |
// запуск функции | |
monitorEvents(document.body); // Следить за всеми событиями | |
monitorEvents(document.body, "mouse"); // Следить за событиями мыши | |
monitorEvents(document.body, "key"); // Следить за событиями клавиатуры | |
monitorEvents(document.body, "touch"); // Следить за событиями прикосновений к экрану | |
monitorEvents(document.body, "control"); // Следить за событиями resize, scroll, select и пр. |
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
html, body { | |
margin: 0; | |
padding: 0; | |
} | |
html { | |
min-height: 100%; | |
position: relative; | |
} |
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
preferred_syntax = :sass | |
http_path = '/' | |
css_dir = 'assets/stylesheets' | |
sass_dir = 'assets/sass' | |
images_dir = 'assets/images' | |
javascripts_dir = 'assets/javascripts' | |
relative_assets = true | |
line_comments = true | |
# output_style = :compressed |
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
// Объявление попап-функций. Плагин Magnific Popup | |
var openSucsessPopup = function() { | |
$.magnificPopup.open({ | |
items: { src: '#sucsess-popup' }, | |
type: 'inline', | |
fixedContentPos: false, | |
fixedBgPos: true, | |
overflowY: 'auto', | |
closeBtnInside: true, | |
preloader: false, |
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
// Без комментов | |
$(document).mouseup(function(e) { | |
var div = $("#popup-element"); | |
if (!div.is(e.target) && div.has(e.target).length === 0) { | |
$('#popup-element').addClass('hidden'); | |
// $('#popup-element').hide(); // еще способ скрыть. | |
} | |
}); |
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
// Norm | |
body | |
font-family: Helvetica, Arial, Sans-Serif | |
// Better | |
body | |
font-family: Sans-Serif | |
// Why? | |
Macs will get awesome Helvetica by default. On PC's, |
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
.clearfix:before, | |
.clearfix:after | |
content: " " | |
display: table | |
.clearfix:after | |
clear: both | |
.clearfix | |
*zoom: 1 |
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
// more here http://stackoverflow.com/questions/662220/how-to-change-the-pop-up-position-of-the-jquery-datepicker-control | |
beforeShow: function(input, inst) { | |
var cal = inst.dpDiv; | |
var top = $(this).offset().top + $(this).outerHeight(); | |
var left = $(this).offset().left; | |
setTimeout(function() { | |
cal.css({ | |
'top' : top, | |
'left': left |
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
gulp.src(['input/folder/**/*']).pipe(gulp.dest('output/folder')); |