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 8886497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:34:23+00:00 2026-06-14T21:34:23+00:00

I have a ContainerView which contains a CollectionView . After this CollectionView renders on

  • 0

I have a ContainerView which contains a CollectionView. After this CollectionView renders on the screen I need to perform a jquery function which essentially looks through the content of the rendered template and performs some display modifications.

If I perform that jquery within the didInsertElement of CollectionView it works but it gets executed for every single element in the CollectionView where as I really just need it to be done once at the end. How do I specify that?

http://jsfiddle.net/JFqNr/ (note doesn’t render on jsfiddle or some reason but just to show you structure)

App = Ember.Application.create();

App.FooContainerView = Ember.ContainerView.extend({
    childViews: ['elementList'],    

    elementList: Ember.CollectionView.extend({
        content: function() {
            return [
                { Title: "Dashboard", ID: "dashboard" },
                { Title: "Invoices", ID: "invoices" },
                { Title: "Expenses", ID: "expenses" },
                { Title: "People", ID: "people" },
                { Title: "Reports", ID: "reports" },
                { Title: "Settings", ID: "settings" }
            ];
        }.property(),        
       template: Ember.Handlebars.compile( '{{view.content.title}}' ),

       didInsertElement: function() {
             // perform jquery function            
       }
    }),

   didInsertElement: function() {
         // does not work if perforemed here
   }    
});

App.initialize();
​
  • 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-14T21:34:24+00:00Added an answer on June 14, 2026 at 9:34 pm

    The functionality to do this has only very recently been added to the master branch, so you will need to be compile your own version of Ember.
    You can now schedule into an afterRender queue to run after all the individual views have been rendered.

    App.FooContainerView = Ember.ContainerView.extend({
      // Existing code
      didInsertElement: function() {
        Ember.run.scheduleOnce('afterRender', this, function(){
          // perform jQuery function here;
        });
     }
    

    See https://github.com/emberjs/ember.js/pull/1528 for code details.

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

Sidebar

Related Questions

I have a container view that looks something like this <UserControl x:Class=Views.ContainerView> <UserControl.Resources> <ResourceDictionary>
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
I have a view which contains 2 image view that is using the ondraglistener
can you define a containerview like this and have it work as a regular
I have a Ember.View.ParentView that has two childViews. One of which is a ContainerView.
So I have a UIView which I call ctrView and this ctrView is added
I have a ScrollView that contains a ContainerView. The ContainerView contains another View that
Have deployed numerous report parts which reference the same view however one of them
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:

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.