- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<?php | |
/** | |
* Bolt config v0.1 (16.05.2015) | |
*/ | |
// My server (apache on localhost and nginx on remote) takes /web dir as web_dir | |
// 1. | |
// Remote server index file is app.php |
from carlo.zottmann.org
Did you know Google runs a free and open image resizing service? I certainly didn't.
While lazily poking around the Google+ HTML I found an interesting thing: for resizing post images on the fly, G+ uses an open API endpoint. That might come in handy at some point in the future when prototyping this or that, so jotting down some notes felt like a good idea.
If you know more about this API, let me know, please! (See the sidebar for options.)
A word of warning before I progress: I've spent ~45 minutes on both my experimentation and this here write-up, maybe an hour. You've been warned.
![Backbone.js][1]
Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
The project is [hosted on GitHub][2], and the [annotated source code][3] is available, as well as an online [test suite][4], an [example application][5], a [list of tutorials][6] and a long list of real-world projects that use Backbone. Backbone is available for use under the [MIT software license][7].
_.each(list, iteratee, [context])
Alias: forEach
Iterates over a list of elements, yielding each in turn to an iteratee function. The iteratee is bound to the context object, if one is passed. Each invocation of iteratee is called with three arguments: (element, index, list)
. If list is a JavaScript object, iteratee's arguments will be (value, key, list)
. Returns the list for chaining.
_.each([1, 2, 3], alert);
=> alerts each number in turn...
_.each({one: 1, two: 2, three: 3}, alert);
=> alerts each number value in turn...
The problem is not the transform. If you try logging the scrollTop value you'll see that firefox always returns 0, that's because ff has the scroll attached to the html, not the body. Here's a cross browser solution:
http://jsfiddle.net/jonigiuro/kDSqB/9/
var $cog = $('#cog'),
$body = $('body'),
bodyHeight = $body.height();
<?php | |
namespace Mapple\Bolt; | |
use Bolt; | |
use Mapple\Bolt\CustomTranslationsProvider; | |
use SilexMtHaml\MtHamlServiceProvider; | |
Class AppInit { | |
public function __construct ($path) { |
// class General extends AsyncBase | |
protected function addRoutes(ControllerCollection $c) | |
{ | |
//... | |
$c->get('/massedit/read/{contenttypeslug}', 'readMassEdit') | |
->value('data_type', 'values') | |
->bind('readmassedit'); | |
//... | |
} |
<?php | |
namespace Bolt; | |
use Bolt\Helpers\Html; | |
use Bolt\Helpers\Input; | |
use Bolt\Helpers\Str; | |
use Bolt\Library as Lib; | |
use Maid\Maid; | |
use Silex; |