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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:04:03+00:00 2026-06-04T07:04:03+00:00

I have a template that iterates over a controller array – and for some

  • 0

I have a template that iterates over a controller array – and for some reason i can’t use the jquery-ui accordion function – I think that this is due to the added markup ember adds to the html e.g. <script type="text/x-placeholder" id="metamorph-1-start"></script>

Any thoughts how can i fix this?

here is the code:

<div id="chat-tab-container">

                <script type="text/x-handlebars">
                    {{#each App.chatTabsController}} 

                        <h3 class="row1">
                            <div class="avatar " style="background: red;">*</div>
                            <div class="contact-name ">{{contactName}}</div>
                        </h3>
                        <div class="row2">
                            <div class="contact-name ">content</div>
                        </div>

                        <h3 class="row1">
                            <div class="avatar " style="background: red;">*</div>
                            <div class="contact-name ">boni</div>
                        </h3>
                        <div class="row2">
                            <div class="contact-name ">content</div>
                        </div>

                    {{/each}}
                </script>

            </div>

and the jquery call: $('#chat-tab-container').accordion()

  • 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-04T07:04:04+00:00Added an answer on June 4, 2026 at 7:04 am

    As Cory mentioned the problem is that the content for the accordion is not rendered/inserted in the DOM when you call the accordion method. One workaround is that you use a ember view as a wrapper and call the accordion method inside the didInsertElement method. I have provided a fiddle with a working example.

    Basically your template changes to:

    <script type="text/x-handlebars">
      {{#view App.TabView}}                     
        {{#each App.chatTabsController.content}} 
          <h3>{{contactName}}</h3>
          <div>content for {{contactName}}</div>
        {{/each}}
      {{/view}}
    </script>
    

    ​
    Code for view:

    App.TabView = Ember.View.extend({
        tagName: 'div',        
        didInsertElement: function() {
            this.$().accordion();
        }
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a simple template that i populate with some data then im trying
I have taken over some work on an existing system that uses NVelocity templates.
I've got an function that iterates over a container and passes each element to
I have a loop in my script, which iterates over an array - myArray
I have a function calc_dG that, for any array corresponding to a short DNA
I have a checkbox list creating an array that I want to iterate over
I have template that looks like this: 100 template<size_t A0, size_t A1, size_t A2,
I have a template that creates a unique identifier for each type it is
I have a Django template that I want to extend in multiple places. In
I have Microsoft Word template that I automated filling it's fields from my application,

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.