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
// Объявление попап-функций. Плагин 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
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
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
// набирать в консоли | |
// запуск функции | |
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
-------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
Перенес все в мой ман: https://github.com/igorpronin/my-mans/blob/master/git/_git.md | |
git config --global user.name "User Name" // set user name | |
git config --global user.email "[email protected]" // set user email | |
git config --list // show active settings | |
git help commit // open git manual in browser | |
cd c:/targetdir // change directory | |
git init // create git repository in this directory or reinit existing | |
git status // show info about files status (untracted / unmodified etc) | |
git add . // add all files to unmodified status |
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
$("#click_tag").click(function() { | |
if ($("#target_tag").attr("attr_name")==("attr_value1")) { | |
$("#target_tag").attr("attr_name", "attr_value2"); | |
} else { | |
$("#target_tag").attr("attr_name", "attr_value1"); | |
} | |
}); |
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 | |
<div class="wrap"> | |
<div class="content"> </div> | |
</div> | |
CSS | |
.wrap { | |
background-color: green; |
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
Работает в новых браузерах. IE - от 10. | |
--- | |
HTML | |
<div class="wrap"> | |
<div class="content"> </div> | |
</div> | |
<div class="wrap"> |