Code Monkey home page Code Monkey logo

backbone-modalview's Introduction

Usage

Usage is pretty straight forward, first you need to include backbone.modalview.js and backbone.modalview.css, then you can simply invoke a modal as follows:

var view = new Backbone.ModalView({
  modalContent: 'Hello, World!'
});

Because ModalView extends from View you get everything you would in a regular view.

Using With Bower

You can include Backbone.ModalView using Bower: $ bower install --save backbone-modalview. For now it's better to always use the latest version as there's no stable version at the moment.

API Documentation

For the full API documentation you can run yuidoc from the repository folder to build a doc/ directory with specific documentation on the full API.

Extending ModalView

If you want to extend ModalView to add custom functionality you can do so as follows:

var MySuperModalView = Backbone.ModalView.extend({

  initialize: function (options) {
    // Call base constructor in this context
    Backbone.ModalView.prototype.initialize.apply(this, arguments);

    // Your code here...
  }

});

Styling the modal

Just modify backbone.modalview.css as needed, it's designed to be simple to understand and modify.

Versioning

Backbone.ModalView uses Semantic Versioning, which quoting from their website can be easily defined as follows:

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards-compatible manner, and
  3. PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

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.