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
<fest:template> | |
&bem b-datalist { | |
ctx.head ? &__head ctx.head | |
for item in ctx.items { | |
&__item item | |
} | |
ctx.foot ? &__foot ctx.foot | |
} |
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 extension, add support `scrollstart` and `scrollend` events. | |
* | |
* @author RubaXa <trash@rubaxa.org> | |
* @github https://gist.github.com/RubaXa/5568964 | |
* @license MIT | |
* | |
* | |
* @settings | |
* $.special.scrollend.delay = 300; // default ms |
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 extension, add support `classList`. | |
* | |
* @author RubaXa <trash@rubaxa.org> | |
* @license MIT | |
*/ | |
(function ($){ | |
var | |
_rspace = /\s+/ |
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 el = document.getElementById('choose'); | |
FileAPI.event.on(el, 'change', function (evt){ | |
var files = FileAPI.getFiles(evt); | |
FileAPI.filterFiles(files, function (file, info){ | |
return /^image/.test(file.type); | |
}, function (files, ignor){ | |
if( files.length ){ | |
// ... | |
} |
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
/*! PickMeUp - jQuery datepicker plugin | Nazar Mokrynskyi <nazar@mokrynskyi.com> | Stefan Petre <www.eyecon.ro> MIT */ | |
(function(d){function getMaxDays(){var tmpDate=new Date(this.toString()),d=28,m=tmpDate.getMonth();while(tmpDate.getMonth()==m){++d;tmpDate.setDate(d);}return d-1;}d.addDays=function(n){this.setDate(this.getDate()+n);};d.addMonths=function(n){ | |
var day=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+n);this.setDate(Math.min(day,getMaxDays.apply(this)));};d.addYears=function(n){var day=this.getDate();this.setDate(1);this.setFullYear(this.getFullYear()+n);this.setDate(Math.min(day,getMaxDays.apply(this)));};d.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/24*60*60*1000);};})(Date.prototype);(function($){ | |
$.pickmeup=$.extend($.pickmeup||{},{date:new Date,flat:false,first_day:1,prev:"◀",next:"▶",mode:"single",view:"days",calendars:1,f |
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
/*! $.ajaxCache | RubaXa <trash@rubaxa.org> | MIT */ | |
(function ($){ | |
var _cache = {}; | |
var _cacheKey = function (options){ | |
return options.url + $.param(options.data || {}); | |
}; | |
/** | |
* Get cache storage |
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 event "tap" (Based on https://developers.google.com/mobile/articles/fast_buttons) | |
* | |
* @author RubaXa <trash@rubaxa.org> | |
* @license MIT | |
*/ | |
(function (window, $){ | |
var | |
support = window.TapSupportEnabled && ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch |
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
(new UISequence) | |
.on('click', '.js-cbx') // начало цепочки | |
.choose() // любое следующее действие | |
.group() // группа действий | |
.choose() // опять выбор любого | |
.scrollDY(-200) // либо scrollUp на 200px | |
.group() // либо группа из | |
.scrollDY(100) // scrollDown на 100px | |
.endPage() // и достигли конца страницы | |
.end() // закрываем группу |
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
/** | |
* @author RubaXa <trash@rubaxa.org> | |
* @license MIT | |
*/ | |
(function (){ | |
"use strict"; | |
var _rspace = /\s+/; | |
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
/** | |
* Set/get dataset | |
* | |
* @param {String|Object} [data] | |
* @param {Mixed} [value] | |
* @retuns {Mixed} | |
*/ | |
jQuery.fn.dataset = function (data, value){ | |
var | |
argsNum = arguments.length |