File: binding.coffee

Defined in: template

Method Summary

Method Details

? Gunther.Template.prototype.on(event, handler) Source

Add an event handler

Set up an event handler for DOM events, uses jQuery's bind()

Parameters:

  • eventevent name
  • handlerhandler method

? Gunther.Template.prototype.haltedOn(event, handler) Source

A "halted" on, that has no propagation (and no default)

Before the handler is called, the stopPropagation() and preventDefault() are called on the event

See {Gunther.Template::on}

Parameters:

  • eventevent name
  • handlehandling method

? Gunther.Template.prototype.show(model, properties, resolver) Source

Show/hide an element based on a boolean property

Parameters:

  • modelThe model to bind on
  • propertiesEither a single property, or a list or properties (given as string)
  • (Boolean) resolvera method that will return a Boolean method that determines whether the element should be visible or not

? Gunther.Template.prototype.hide(model, properties, resolver) Source

Hide/show an element based on a boolean property

This is simply show() inverted

See {Gunther.Template::hide}

Parameters:

  • modelThe model to bind on
  • propertiesEither a single property, or a list or properties (given as string)
  • (Boolean) resolvera method that will return a Boolean method that determines whether the element should be hidden or not