rstacruz / backbone-patterns Goto Github PK
View Code? Open in Web Editor NEWCommon Backbone.js usage patterns.
Home Page: http://ricostacruz.com/backbone-patterns
Common Backbone.js usage patterns.
Home Page: http://ricostacruz.com/backbone-patterns
The code in question: https://github.com/rstacruz/backbone-patterns/blob/master/doc/style.css#L178
This makes scrolling on the page extremely slow. Try removing it through the inspector and the scrolling speed is back to normal.
Can you explain a little about what you would put in the app.js file?
.html() should be used instead. There's a detailed description of the issue at http://www.bennadel.com/blog/1829-Script-Tags-jQuery-And-Html-Text-And-Contents-.htm
There is a bug with your Animation pattern implementation.
Buffer = {
commands: [],
// Adds a command to the buffer, and executes it if it's the only command
// to be ran.
add: function(fn) {
this.commands.push(fn);
if (this.commands.length == 1) fn();
},
// Moves onto the next command in the buffer.
next: function() {
this.commands.shift();
if (this.commands.length) this.commands.shift()();
}
};
The add function should not call the callback fn but call next instead.
Buffer = {
commands: [],
// Adds a command to the buffer, and executes it if it's the only command
// to be ran.
add: function(fn) {
this.commands.push(fn);
if (this.commands.length == 1) this.next();
},
// Moves onto the next command in the buffer.
next: function() {
if (this.commands.length) this.commands.shift()();
}
};
Cannot provide a pull request because your master branch is not up to date.
Bye,
François
Just a suggestion but it works well (obviously, styling may be an issue to consider):
http://fragged.org/backbone-patterns/
works through my mootools port of the twitter bootstrap scrollspy - can do a proper clone/pull request, if you like though I imagine you could use the original, which is powered by jquery instead.
just scroll down or use the menu.
Tried to add this as pull request, but couldn't get all the rake dependencies to build the document.
Basically just add another css file for print media = "print"
or I think you can do:
@media print {
...
}
... and just hide the sidebar. Then us old timers can have our paper copy :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.