简体   繁体   中英

table inside a jquery accordion

I want to wrap a table in a jquery accordion like this...

<div class="accordion">
    <h3>Room Flow</h3>
    <div>
        <table>
            <tr>
                <td>contained content</td>
            </tr>
        </table>
    </div>
</div>

The output however is different. The accordion divs a re rendered above the table like this...

<div class="accordion">
    <h3>Room Flow</h3>
    <div>

    </div>
</div>
<table>
    <tr>
        <td>contained content</td>
    </tr>
</table>

The tables are displayed via a partialview. The accordion divs are in the parent view. This is in an asp.net mvc razor project.

edit: I need to mention that when I remove the tables, the accordion works.

I solved the issue. I was using extra wrapper while getting results. I will post code in some time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM