Skip to content

Instantly share code, notes, and snippets.


Scott Chen rightson

View GitHub Profile
rightson / app.js
Created Dec 15, 2011 — forked from skypanther/app.js
Draw gridlines in a Titanium window
View app.js
// implement like this:
var window = Ti.UI.createWindow({
// draw the gridlines first so your other elements stack on top of them
// without requiring you to set the z-index property of each
var grid = require('gridlines');
View backbone3-router-env.html
<html lang="en-US">
<meta charset="UTF-8">
<title>Learning About Backbone.js Routers</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
rightson / backbone3-router-example.js
Created Jun 24, 2012
Backbone JS Router example
View backbone3-router-example.js
var myRouter = Backbone.Router.extend({
routes: {
":foo": "func1",
":foo/:bar" : "func2",
"*action" : "funcU"
func1: function(p1) {
alert('func1: '+p1);
console.log('func1: '+p1);
View backbone2-view-env.html
<html lang="en-US">
<meta charset="UTF-8">
<title>Learning About Backbone.js Views</title>
<style type="text/css">
#container{ padding:20px; border:1px solid #333; width:400px; }
#list-template{ display:none; }
View backbone2-create-my-model.js
myModel = new Backbone.Model({
{ text: "Google", href: "" },
{ text: "Facebook", href: "" },
{ text: "Youtube", href: "" }
View backbone2-create-view.js
var myView = Backbone.View.extend({
initialize: function () {
console.log('create view');
el: '#container',
events: {
"click button": "render"
template: $('#list-template').children(),
render: function() {
You can’t perform that action at this time.