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
/* Small Devices, Tablets */ | |
@media only screen and (max-width : 768px) { | |
.animated { | |
/*CSS transitions*/ | |
-o-transition-property: none !important; | |
-moz-transition-property: none !important; | |
-ms-transition-property: none !important; | |
-webkit-transition-property: none !important; | |
transition-property: none !important; | |
/*CSS transforms*/ |
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_element").click(function() { | |
if ($(".target_element").is(".class_1")) { | |
$(".target_element").removeClass("class_1"); | |
$(".target_element").addClass("class_2"); | |
} else { | |
$(".target_element").removeClass("class_2"); | |
$(".target_element").addClass("class_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
HTML | |
<div class="wrap"> | |
<img src="img/img.jpg"> | |
</div> | |
CSS | |
.wrap { | |
width: 200px; |
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
Способ надежный, но для .wrap нельзя задать размеры в %. Плохо подходит для адаптива. | |
----------- | |
HTML | |
<div class="wrap"> | |
<div class="content"> </div> | |
</div> | |
CSS |
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> | |
<div class="wrap"> | |
<img src="http://lorempixel.com/200/200/sports/" width="200" height="200"> | |
</div> |
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"> |
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
$("#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
-------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 и пр. |
OlderNewer