Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Somewhere you are calling jQuery's <a href="http://api.jquery.com/remove/" rel="nofollow"><code>remove</code></a> and that</p> <blockquote> <p>In addition to the elements themselves, all bound events and jQuery data associated with the elements are removed.</p> </blockquote> <p>so the <a href="http://api.jquery.com/delegate/" rel="nofollow"><code>delegate</code></a> call that Backbone uses to bind events to your <code>postAddView.el</code> will be lost. Then, when you re-add your <code>postAddView.el</code>, there are is no <code>delegate</code> attached anymore and no events are triggered. Note that Backbone.View's standard <a href="http://documentcloud.github.com/backbone/#View-remove" rel="nofollow"><code>remove</code></a> method calls jQuery's <code>remove</code>; a few other things in jQuery, just as <a href="http://api.jquery.com/empty/" rel="nofollow"><code>empty</code></a> will do similar things to event handlers. So the actual function call that is killing your <code>delegate</code> could be hidden deep inside something else.</p> <p>You could try calling <a href="http://documentcloud.github.com/backbone/#View-delegateEvents" rel="nofollow"><code>delegateEvents</code></a> manually:</p> <pre><code>this.elms['page-content'].html(this.postAddView.render().el); this.postAddView.delegateEvents(); </code></pre> <p>or better, just throw the view away and create a new one every time you need it. Your view objects should be pretty light weight so creating new ones should be cheap and a lot less hassle than trying to keep track of the existing views by hand.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload