DailyJS

jQuery Roundup: ParamQuery Grid, Backbone.ViewDSL, Events Demo

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

jquery plugins backbone.js

jQuery Roundup: ParamQuery Grid, Backbone.ViewDSL, Events Demo

Posted by Alex R. Young on .
Featured

jquery plugins backbone.js

jQuery Roundup: ParamQuery Grid, Backbone.ViewDSL, Events Demo

Posted by Alex R. Young on .
Note: You can send your plugins and articles in for review through our contact form or @dailyjs.

ParamQuery Grid

ParamQuery

ParamQuery Grid (GitHub: paramquery / grid, License: MIT) by Paramvir Dhindsa is a table grid plugin that's based on jQuery UI widgets. It supports sorting, row and cell selection, built-in and custom editing, resizing, and pagination.

The author has written full API documentation for ParamQuery, and an introductory tutorial. Additional data formats can be supported with the dataModel API, but it works with XML and JSON out of the box.

Backbone.ViewDSL

Backbone.ViewDSL (GitHub: andreypopp / backbone.viewdsl, License: BSD3) by Andrey Popp is a DSL for defining Backbone.View hierarchies. Views can be automatically loaded (AMD is supported), instantiated, and interpolated.

The author's example compares a ViewDSL class with a standard Backbone class:

class App extends Backbone.ViewDSL.View  
  template: """
    <h1>{{options.title}}</h1>
    <view name="app.views.Sidebar" id="sidebar" />
    <view name="app.views.Content" id="content" />
    <div class="footer">{{options.title}} by {{options.author}}</div>
    """

In that example, app.views.Sidebar refers to another Backbone.View. A view attribute is also supported, and views can be accessed with Backbone.ViewDSL.View.from. Although Andrey describes the library as 'tiny', it packs in other features including conditional DOM removal, and there are some PhantomJS-powered Mocha tests as well.

Events Demo

Events Demo (GitHub: liouh / js-events-demo) by Henry Liou is an interactive demo that shows how each property works on the event object jQuery passes to .on. It uses nested elements so you can see how target and relatedTarget change depending on which element the event was triggered on.

Given how many people confuse the target properties, it made me wonder if this would be better than the official jQuery documentation. This project was sent in by Anthony Ettinger.