0

でのアコーディオン宣言Site.Master

  $(function () {
                $("#userList").accordion({ active: false });
     });

私の見解:

<% foreach (var item in Model)  
   { %>  
       <h3><a href="#"><%: item.Key %></a></h3>  
       <div id="userList">  
    <% foreach (var docs in item.Value)
       { %>
           <h3><a href="#"><%: docs.Key %></a></h3>  

            <% foreach (var doc in docs.Value)
               { %>   

            <% } %>

     <%  } %>  

       </div>  
<% } %>  

最初のレコードにはアコーディオンがあり、後続のレコードにはありません。要素を検査すると、最初のレコードにはこのクラスがあります class="ui-accordion ui-widget ui-helper-reset ui-accordion-icons"

私が何を観察できていないのかわかりません。使用していますaspx engine

ページのソース:

<div id="body">

    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h2>Search Result</h2> <br />
                <h2>John doe</h2>
            </hgroup>
        </div>
    </section>

    <section class="content-wrapper main-content clear-fix">
        <h3><a href="#">2222222</a></h3>  
        <div id="userList">  
            <h3><a href="#">Test1</a></h3>  
            <a href="http://somewhere">Testing1</a> <br />
        </div>  

       <h3><a href="#">123123123</a></h3>  
       <div id="userList">  
           <h3><a href="#">Testing2</a></h3>  
            <a href="http://sommewhere">Testing2</a> <br />
       </div>  

    </section>
    </div>
4

1 に答える 1