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
/** | |
* создание каррированной функции, | |
* используя gist - https://gist.github.com/monochromer/c95ac295f2a9ae7c231f | |
* @param {string} name - имя функции | |
* @param {Function} func - определение функции | |
*/ | |
Function.method('curry', function ( ) { | |
var slice = Array.prototype.slice, | |
args = slice.apply(arguments), | |
that = this; |
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 UI | |
*/ | |
.ui-datepicker { | |
display: inline-block; | |
} | |
.ui-datepicker-header { | |
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
/** | |
* Слайдер jQuery UI | |
*/ | |
.ui-slider { | |
position: relative; | |
text-align: 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
/** | |
* Создание множества. | |
* @constructor | |
*/ | |
function Set() { | |
/** | |
* Приватная переменная для хранения множества | |
*/ | |
var items = {}; |
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
/** | |
* Стек. | |
* @constructor | |
*/ | |
function Stack() { | |
/** | |
* Приватная переменная для хранения элементов стека | |
*/ | |
var items = []; |
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
/** | |
* Очередь | |
* @constructor | |
*/ | |
function Queue () { | |
/** | |
* Приватная переменная для хранения элементов очереди | |
*/ | |
var items = []; |
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
(function(callback) { | |
callback(window.jQuery, window, document); | |
}(function($, window, document) { | |
// The $ is now locally scoped | |
$(function() { | |
}); | |
} | |
})); |
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 APP = APP || {}; | |
APP.namespace = function (ns_string) { | |
var parts = ns_string.split('.'), | |
parent = APP, | |
i, len; | |
if (parts[0] === "APP") { | |
parts = parts.slice(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
var Observer = (function () { | |
'use strict'; | |
var exports = {}; | |
var events = {}, | |
splitter = /\s+/; | |
var on = function(types, fn, context) { | |
var type; |
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
function Gadget () { | |
// частный член | |
var name ='iPod'; | |
// общедоступная функция | |
this.getName = function () { | |
return name; | |
}; | |
} |
OlderNewer