-1
我的Jquery手風琴形式完美地工作,除非我把標籤拉到整個盒子周圍。這個想法是將表格分開,因爲會收集很多信息。Jquery Accordion Form Wrap
http://www.bigwavemedia.co.uk/test/(工作與表單標籤內手風琴的一個版本)
http://www.bigwavemedia.co.uk/test/index.php/stack(休息時,我走動整個手風琴系統的表單標籤)
代碼--->工作版本
<div id="container">
<div class="preOrderTop">
<h1>Pre Order</h1>
</div>
<?php
$this->load->helper("form");
echo validation_errors();
echo "<div id='accordion'>";
echo "<h3>Party Details</h3>";
echo $message;
echo form_open("welcome/send_email");
echo form_label("Name:", "name");
$data = array(
"name" => "fullName",
"id" => "fullName",
"value" => set_value("fullName")
);
echo form_input($data);
echo form_label("Email:", "email");
$data = array(
"name" => "email",
"id" => "email",
"value" => set_value("email")
);
echo form_input($data);
echo form_label("Telephone", "telephone");
$data = array(
"name" => "telephone",
"id" => "telephone",
"value" => set_value("telephone")
);
echo form_input($data);
echo form_label("date", "date");
$data = array(
"name" => "date",
"id" => "date",
"value" => set_value("date")
);
echo form_input($data);
echo "<br>";
echo form_submit("contactSubmit", "send");
echo form_close();
?>
<h3>Section 2</h3>
<div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div>
<h3>Section 3</h3>
<div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>
</div>
</div>
</div>
但是當我將整個表單標籤包裹在手風琴周圍時,它會打破嗎?我不知道如何解決這個問題,它讓我吃了香蕉。
- >與表單代碼纏
<div id="container">
<div class="preOrderTop">
<h1>Pre Order</h1>
</div>
<?php
$this->load->helper("form");
echo validation_errors();
echo $message;
echo form_open("welcome/send_email");
echo "<div id='accordion'>";
echo "<h3>Party Details</h3>";
echo $message;
echo form_open("welcome/send_email");
echo form_label("Name:", "name");
$data = array(
"name" => "fullName",
"id" => "fullName",
"value" => set_value("fullName")
);
echo form_input($data);
echo form_label("Email:", "email");
$data = array(
"name" => "email",
"id" => "email",
"value" => set_value("email")
);
echo form_input($data);
echo form_label("Telephone", "telephone");
$data = array(
"name" => "telephone",
"id" => "telephone",
"value" => set_value("telephone")
);
echo form_input($data);
echo form_label("Date", "date");
$data = array(
"name" => "date",
"id" => "date",
"value" => set_value("date")
);
echo form_input($data);
echo "<br>";
?>
<h3>Section 2</h3>
<div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div>
<h3>Section 3</h3>
<div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>
</div>
<?php
echo form_submit("contactSubmit", "send");
echo form_close();
?>
</div>
任何想法?
感謝
請給出具體的代碼示例。鏈接到其他頁面,需要用戶使用開發人員工具進行診斷並沒有用,90%的時間,沒有人會回答你 – zgr024 2013-03-14 14:19:49
更新時,爲什麼這次被拒絕? – Brent 2013-03-14 14:23:11
由於zgr提到的原因。把HTML放在你的問題中,而不是服務器端代碼。 – isherwood 2013-03-14 14:35:14