jQuery.Controller.static.processors.subscribe  function     

plugin: jquery/controller/subscribe

Adds OpenAjax.Hub subscribing to controllers.

$.Controller("Subscriber",{
  "recipe.updated subscribe" : function(called, recipe){

  },
  "todo.* subscribe" : function(called, todo){

  }
})

You should typically be listening to jQuery triggered events when communicating between controllers. Subscribe should be used for listening to model changes.

API

This is the call signiture for the processor, not the controller subscription callbacks.

$.Controller.processors.subscribe(el, event, selector, cb) -> undefined
{HTMLElement}

the element being bound. This isn't used.

{String}

the event type (subscribe).

{String}

the subscription name

{Function}

the callback function

{undefined}
© Jupiter IT - JavaScriptMVC Training and Support