Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8322477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:24:06+00:00 2026-06-08T23:24:06+00:00

Need to call .delegateEvents() on all child views inside a parent collection view in

  • 0

Need to call .delegateEvents() on all child views inside a parent “collection” view in order to re-delegate events after having removed the parent view from the page and then put it back on.

I can see two ways of doing this, both of which don’t sound quite right to me in terms of proper practices:

  • Whenever addOne() is called in the parent view, save the child view that was just created to a list. When the events need to be re-delegated later on when the view is added back onto the page. Use the array to scroll back through that list and call .delegateEvents() on each child view item. The problem with this approach, is the creating of a separate array to hold everything inside the view when the view already has a Backbone-sanctioned way to influence it’s child views through this.collection.each()
  • Use the built in View.collection.each() inside the view to scroll through each child model. Trigger an event on each model that causes its corresponding view to call .delegateEvents() on itself. The problem with this approach is that a purely view-oriented action is being routed through the models.

Are either of these approaches any good or is there a better way that I should be doing this?

Thanks so much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:24:08+00:00Added an answer on June 8, 2026 at 11:24 pm

    Go for the first one. You want to keep a reference to a CollectionView’s child views anyway, for proper removal and reinitialization. The problem with the latter pattern is if the model is represented by several collection views, all of those collection views will be triggered unnecessarily.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to call the initialize method of the parent class, from inside the
I need to call a JS function with a C# parameter. This is inside
I need to call a function after page load, but only once, page elements
I need to call an API function after validating a form with is_valid(). This
If I need call this functions one after other, $('#art1').animate({'width':'1000px'},1000); $('#art2').animate({'width':'1000px'},1000); $('#art3').animate({'width':'1000px'},1000); I know
I have a couple of methods that do processing after fetching data.I need call
i need to call customFormElements.js js function after aspx page is loaded, after submit
I writing a PHP script program under Linux. In the script, I need call
Need to call a filter function on some options based on a radio selected
I need to call Ghostscript in one of our cgi to convert a PDF

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.