<?xml version="1.0"?>
<fest:template xmlns:fest="http://fest.mail.ru" context_name="json">
<div class="elm">
<fest:attributes>
<fest:attribute name="id">box</fest:attribute>
<fest:attribute name="style">color: red;</fest:attribute>
<fest:attribute name="class"><fest:space/>js-elm</fest:attribute>
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
// jsfiddle: http://jsfiddle.net/Pj7G4/1/ | |
var store = indexeddbStore("user") | |
store.put({ name: "bob" }, "bob", function (err, result) { | |
store.get("bob", function (err, user) { | |
console.log(user.name === "bob") | |
}) | |
}) |
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://bitovi.com/blog/2012/04/faster-jquery-event-fix.html | |
// https://gist.github.com/2954434 (original: https://gist.github.com/2377196) | |
// http://jsperf.com/jquery-event-fix/6 | |
// IE 8 has Object.defineProperty but it only defines DOM Nodes. According to | |
// http://kangax.github.com/es5-compat-table/#define-property-ie-note | |
// All browser that have Object.defineProperties also support Object.defineProperty properly | |
Object.defineProperties && (function (document, $){ | |
var |
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
/** | |
* Watcher leaks for jQuery | |
* RubaXa <[email protected]> | |
* MIT Licensed. | |
* | |
* API: | |
* $.leaks.get(); | |
* $.leaks.watch(); | |
* $.leaks.unwatch(); | |
* $.leaks.remove(); |
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 <[email protected]> | |
* @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 <[email protected]> | |
* @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
/** | |
* Fastest jQuery.fn.find | |
* @jsperf http://jsperf.com/jquery-find-vs-jquery-fastestfind | |
* @author RubaXa <[email protected]> | |
* @license MIT | |
*/ | |
/* global document, jQuery */ | |
document.createElement('div').querySelectorAll && (function ($, originalFind){ |
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 <[email protected]> | 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 |
OlderNewer