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: " "; /* 1 */ | |
display: table; /* 2 */ | |
} | |
.clearfix:after { | |
clear: both; | |
} |
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="wrapper"> | |
<div class="main-content"> | |
</div> | |
</div> | |
<footer class="page-footer"> | |
</footer> | |
/* прибьём футер к низу*/ | |
.wrapper{ |
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
// jQuery plugin | |
http://learn.jquery.com/plugins/basic-plugin-creation/ | |
(function ( $ ) { | |
var shade = "#556b2f"; | |
$.fn.greenify = function() { | |
this.css( "color", shade ); |
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 myModule = (function () { | |
// Инициализирует наш модуль | |
function init () { | |
_setUpListners(); | |
}; | |
// Прослушивает события | |
function _setUpListners () { |
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 pattern = "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$" - тип "string" | |
var re = new RegExp(pattern); - это уже regex | |
// ССЫЛКИ | |
// готовые регулярки | |
Gskinner.com/RegExr/ | |
Regexlib.com | |
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
/* | |
* Данный пример иллюстрирует, как можно заполнять таблицу данными, приходящими аякс запросом, | |
* а также как корректно обновлять данные таблицы | |
* | |
* Подробнее: http://www.datatables.net/usage/columns | |
*/ | |
/* | |
* HTML, template |
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
/* | |
* ------------------------- | |
* AJAX deferred: when, then | |
* ------------------------- | |
*/ | |
// 1 пример | |
// Допустим нам нужно работать с результатами нескольких аякс запросов. Мы можем вэкономить время и вызывать их одновременно (параллельно) | |
$.when( |
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
@font-face { | |
font-family: 'bebas'; | |
src: url('../fonts/firasans-book.eot'); | |
src: url('../fonts/firasans-book.eot?#iefix') format('eot'), | |
url('../fonts/firasans-book.woff') format('woff'), | |
url('../fonts/bebas.ttf') format('truetype'), | |
url('../fonts/firasans-book.svg#svgFirasans-book') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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
© - спецсимвол для значка копирайтов | |
« - кавычки красивые | |
- пробел |
NewerOlder