#A simple Slideshow module wrapped in a Backbone View
- Dependencies ** underscore.js ** backbone.js
Viewable in action in this jsfiddle
| /** | |
| * Requires node v0.7.7 or greater. | |
| * | |
| * To connect: $ curl -sSNT. localhost:8000 | |
| */ | |
| var http = require('http') | |
| , repl = require('repl') | |
| , buf0 = new Buffer([0]) |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 subzey <subzey@gmail.com> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| // EntryPoint.js | |
| define(function () { | |
| return function EntryPoint(model1, model2) { | |
| // stuff | |
| }; | |
| }); | |
| // Model1.js | |
| define(function () { | |
| return function Model1() { |
#A simple Slideshow module wrapped in a Backbone View
Viewable in action in this jsfiddle
| // Note that this uses my Pub/Sub implementation, which is slightly different than | |
| // phiggins' in that jQuery custom events are used, and as such the first event handler | |
| // argument passed is the event object. | |
| // | |
| // jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery | |
| // https://gist.github.com/661855 | |
| // The "traditional" way. |
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 5) then: | |
| // ie === undefined | |
| // If you're in IE (>=5) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |