更改" jQuery步骤"的HTML结构插入

时间:2014-05-23 18:38:54

标签: javascript jquery html twitter-bootstrap jquery-steps

由于jQuery Steps插件不支持使用你自己的html标记,我需要调整插件以至少支持在第二级使用标签。它期望的当前结构如下所示:

<div class="wizard">
    <h2>Title 1</h2>
    <section>Content</section>

    <h2>Title 2</h2>
    <section>Content</section>
</div>

但是我需要使用不同的表单标记将步骤组合在一起:

<div class="wizard">
    <form name="one">
        <h2>Title</h2>
        <section>Content</section>
        <h2>Title</h2>
        <section>Content</section>
    </form>
    <form name="two">
        <h2>Title</h2>
        <section>Content</section>
    </form>
</div>

由于步骤使用&#34; .children()&#34;它仅限于直接的儿童元素。我尝试将children()更改为find(),但这严重破坏了它。这个向导完成了我需要的一切,但我需要它来支持自定义标记。

我已经调整它以支持Twitter Bootstrap但是无法在向导中添加额外的标记使一切都非常具有挑战性。

非常感谢任何想法或建议。

0 个答案:

没有答案