This file contains hidden or 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 LOCATION | |
* --------------------- | |
* http://javascript.ru/window-location | |
*/ | |
http://www.google.com:80/search?q=javascript#test | |
This file contains hidden or 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
/* | |
* Image replacement | |
*/ | |
.ir { | |
background-color: transparent; | |
border: 0; | |
overflow: hidden; | |
/* IE 6/7 fallback */ | |
*text-indent: -9999px; |
This file contains hidden or 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: contain floats | |
* | |
* For modern browsers | |
* 1. The space content is one way to avoid an Opera bug when the | |
* `contenteditable` attribute is included anywhere else in the document. | |
* Otherwise it causes space to appear at the top and bottom of elements | |
* that receive the `clearfix` class. | |
* 2. The use of `table` rather than `block` is only necessary if using | |
* `:before` to contain the top-margins of child elements. |
This file contains hidden or 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
@media print { | |
* { | |
background: transparent !important; | |
color: #000 !important; /* Black prints faster: h5bp.com/s */ | |
box-shadow: none !important; | |
text-shadow: none !important; | |
} | |
a, | |
a:visited { |
This file contains hidden or 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
/* | |
* HTML5 Boilerplate | |
* | |
* What follows is the result of much research on cross-browser styling. | |
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, | |
* Kroc Camen, and the H5BP dev community and team. | |
*/ | |
/* ========================================================================== | |
Base styles: opinionated defaults |
This file contains hidden or 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
// string: one=1&two=2&three=3 | |
// result: Object {one: 1, two: 2, three: 3}; | |
// see: underscorejs.org | |
parseQueryString: function (queryString) { | |
var params = {}; | |
if(queryString){ | |
_.each( | |
_.map(decodeURI(queryString).split(/&/g),function(el,i){ |
This file contains hidden or 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($) { | |
// Сериализовать форму в массив и убрать пустые элементы | |
$.fn.serializeArrayAndFilterEmpty = function() { | |
return $.grep(this.serializeArray(), function(item) { | |
return ($.trim(item.value).length > 0); | |
}); | |
}; | |
// сериализовать форму в массив (для моделей backbone) | |
$.fn.serializeObject = function(){ | |
var obj = {} |
This file contains hidden or 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
// Sort numerically and ascending: | |
var myarray=[25, 8, 7, 41] | |
myarray.sort(function(a,b){return a - b}) //Array now becomes [7, 8, 25, 41] |
This file contains hidden or 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
/*DATATABLES*/ | |
/* | |
* 0) Важные настройки | |
*/ | |
'sScrollX' : '1000px', | |
'sScrollY' : '1000px', | |
'sDom' : '<"topbar"Tlf>t<"bottom"pir><"nclear">', |
OlderNewer