我在准备好文件时移动一些东西。把它想象成一个花哨的标签导航,我在列表导航中有一些动态内容,可以在不同的面板之间切换。
我确实可以控制标记,但是 ul 在 CMS 中的模板与用于插入动态内容的模板不同,所以我基本上是在文档上移动东西,准备将它放在我想要的地方。它工作得很好,除了在 IE7 中,移动永远不会发生。
HTML:
<ul class="pnlHandler"></ul>
<div id="Panels">
<li>Here goes the content that I want to move</li>
<div class="pnlFront">
This has more content, but it's already where I want it
</div>
</div>
JS:
$(document).ready(function(){
$("#Panels").children("li").appendTo(".pnlHandler");
});