我正在寻找一个简单的JQuery选项卡的例子,其中我计划展示两种不同的形式。Jquery流水游戏 - 标签 - div标签中的内容不显示
我遇到了这个例子http://flowplayer.org/tools/demos/tabs/index.htm这是完美的我的需求。
所以我实现了这个简单的例子。有问题的代码是:
<div class="panes"> <div>First tab content. Tab contents are called "panes"</div> <div>Second tab content</div> <div>Third tab content</div> </div>
现在我的第一个选项卡的内容是其中有几个自己的div标签的形式 - 当我把这种形式使用div标签作为第一标签中的内容 - 出现什么。
所以我做了一个简单的变化,并增加了一个div标签的第一个选项卡的内容,如下图所示,仍然会出现什么:
<div class="panes"> <div><div>First tab content. Tab contents are called "panes"</div></div> <div>Second tab content</div> <div>Third tab content</div> </div>
有没有一种简单的方法来解决这个问题。这是我想在我的第一个选项卡中显示的内容 -
<div id="formbox" class="formbox"> <form id="shopping_form" method="post"> <div id="3" style="width:520px;" > <textarea id="message" name="message" rows="3" cols="50"></textarea> </div> <div id="store_row" style="width:220px;float:left;padding-bottom:10px;"><b>Store</b> <input type="text" id="store" name="store" class="required" size="20" /> <input type="hidden" id="store_id"/> </div> <div id="city_column" style="width:200px;float:left;padding-bottom:10px;"><b>City</b> <input type="text" id="city" name="city" size="15"/> </div> <div id="findbutton_column" style="vertical-align:top;width:80px;float:left;"> <input class="find_address" id="findaddress" type="button" value="Find Store"/> </div> <div id="googlerow" style="width:120px;float:left;padding-bottom:10px;"> <b>Select Store</b><select id="google_stores" name="google_stores"></select> <input type="hidden" id="google_address"/> </div> <div id="google_message" style="float:left;padding-bottom:10px;display:none;"></div> <div id="locationrow" style="float:left;padding-bottom:10px;display:none;"> <b>Address/Country</b> <input type="text" id="address" name="address" size="20" /> <input type="text" id="country" name="country" size="20"/> </div> <div style="width:520px;float:left;padding-bottom:10px;" > <b>Price <input type="text" id="price" name="price" size="20" /> </div> <div id="buttonrow" style="width:200px;float:right;display:none;" > <input id="it" type="image" src="http://images.pe.com.s3.amazonaws.com/it.png" height="35px"/> </div> </form> </div>
在没有附加div的第一个示例中,它是否正常工作? – MindingData 2010-06-18 00:49:21
是的,一个工作正常 - 如果只是添加文本的作品 - 只有当你添加一个div它不工作 – Gublooo 2010-06-18 01:19:44