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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:48:57+00:00 2026-06-07T06:48:57+00:00

I have a template for adding items to a store inventory page. I need

  • 0

I have a template for adding “items” to a store inventory page. I need the items to be minimized to show only info like name and price, but once clicked on it will expand to additional information. The list is using knockoutJS and I’m not sure how to go about hooking up the Twitter Bootstrap Collapse items. The ids of the divs I’m referencing are duplicated so the links that toggles the “more info” divs only toggle the first div on the page. Here’s my code so far. I need each link to toggle the div following it no matter how many instances of the templated mark up.

    <ul data-bind="foreach: items" class="inline">
  <fieldset>
    <legend>Store Item List</legend>
    <li class="separator"><div id="item-accordian">
        <div class="row">
            <a id="store-item" data-toggle="collapse" data-target=".collapse" href="#store-item-details">
                <div class="span2">
                    <strong>Name: </strong><span data-bind="text: Name"></span>
                </div>
                <div class="span2">
                    <strong>Price: </strong><span data-bind="text: FormatUnitPrice"></span>
                </div>
                <div class="span2">
                    <strong>Type: </strong><span data-bind="text: ItemType"></span>
                </div>
                <div class="span2">
                    <strong>Status: </strong><span data-bind="text: Status"></span>
                </div>
            </a>
        </div>
        <div id="store-item-details" class="collapse">
            <div class="row">
                <div class="span1">
                    <strong>Description:</strong>
                </div>
                <div class="span4">
                    <span data-bind="text: Description"></span>
                </div>
            </div>
            <div class="row">
                <div class="span8">
                    <ul data-bind="foreach: ItemAttributes">
                        <li class="control-group">
                            <div class="controls">
                                <div class="float-left omega-spacer-10">
                                    <strong data-bind="text: Name">:</strong></div>
                                <div class="float-left omega-spacer-35">
                                    <select class="input-medium" data-bind="options: AttributeValues, optionsText: 'Text', optionsValue: 'Value'">
                                    </select></div>
                            </div>
                        </li>
                    </ul>
                    <div class="row">
                        <div class="span8 float-right">
                            <div class="float-right">
                                <button data-bind="click: $parent.deleteItem">
                                    Delete</button></div>
                            <div class="float-right">
                                <button data-bind="click: $parent.editItem">
                                    Edit</button></div>
                        </div>
                    </div>
                </div>
            </div>
        </div></div>
    </li>
  </fieldset>
</ul>

Thank you for any info you may have.

  • 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-07T06:49:00+00:00Added an answer on June 7, 2026 at 6:49 am

    I simply used the following jQuery:

    jQuery(document).ready(function(){
    $('.accordion .head').click(function() {
        $(this).next().toggle('slow');
        return false;
    }).next().hide();
    });
    

    This code is specified on the Jquery UI accordion documentation suggested by @Ingro. Thanks for pointing me there.

    This allows for multiple sections to be opened and also gets me out of having to fight with the jQuery UI styling that I didn’t want to use. I actually used the “collapse” class from twitter bootstrap which gave a nice border effect so I didn’t have to manually come up with something.

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

Sidebar

Related Questions

I have a knockout template like this: <script type=text/html id=list> <ul data-bind=foreach: items> <li
I have template that looks like this: 100 template<size_t A0, size_t A1, size_t A2,
I have a template in joomla without index.php I only have index.html, css file,
I have a template class method like that: template<class T> static tmpClass<T>* MakeInstance(T value)
I have the following page layout in my application: <Grid x:Name=ContentPanel Grid.Row=1> <ScrollViewer x:Name=ScrollViewer1
I have a template like this: <Style TargetType={x:Type TabItem}> <Setter Property=Template> <Setter.Value> <ControlTemplate TargetType={x:Type
I have listbox in my wp7 app like this <ListBox Name=lstSelectedNumber Height=50 MaxHeight=120 VerticalAlignment=Top
I have template function compare defined as below. #include<iostream> using namespace std; template<typename T>
i have template base.html and some children templates. I don't know how to set
I have template in which a button is created with a link using css,

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.