Code Monkey home page Code Monkey logo

backbone-patterns's Issues

app.js

Can you explain a little about what you would put in the app.js file?

Issue with the animation pattern implementation.

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

add scrollspy func

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.

Print-friendly css

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 :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.