Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Chaining render() after init()

$
0
0
jQuery almost always returns itself on a setter (for chaining).

You can create a render plugin that calls render on each controller:

$.fn.render = function(){
  $.each(this.data('controllers'), function(i, c){
    c.render && c.render()
  })

}




Viewing all articles
Browse latest Browse all 3491

Trending Articles