Read the blog at http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/
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
/* | |
* 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
/*work with Date*/ | |
/* | |
* DATA.JS | |
* https://code.google.com/p/datejs/wiki/APIDocumentation#between | |
* http://www.datejs.com/ | |
*/ | |
Date.today(); |
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
/* | |
* BACKBONE | |
*/ | |
// VIEW | |
define([ | |
'jquery', | |
'backbone', | |
'text!..template.php' |
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
/* | |
* Underscore | |
* Parse object to array | |
*/ | |
_(obj).each(function(elem, key){ | |
// console.log(elem); | |
// console.log(key); | |
obj[key] = _(elem).values(); |
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
// html | |
<label for="year">Год</label> | |
<select name="year" id="year"></select> | |
<label for="month">Месяц</label> | |
<select name="month" id="month"> | |
<option value = "1">01</option> | |
<option value = "2">02</option> | |
<option value = "3">03</option> | |
<option value = "4">04</option> |
NewerOlder