1)我有一个输入。2)有折叠( accordion )块。
我的js技能很低。有人能帮助我吗?
accordion 必须出现时,在输入的东西键入(例如)10个符号。
<input type="text" placeholder="your question">
<!-- This block must appears -->
<div class="advanced-search" id="accordion">
<div class="panel panel-default">
<div class="p-heading">
<h4 class="title-panel panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
<!-- no title cuz action must appear this block --> <b class="caret"></b>
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse">
<div class="panel-body">
<div class="ct-row ct-col-two">
<span class="col-1"><div class="ct-star">*</div><div class="ct-title">what job?</div></span>
<span class="col-2">
<div class="btn-group-horizontal">
<div class="ck-button left">
<label >
<input type="checkbox" value="1"><span class="left">1</span>
</label>
</div>
</div>
</span>
</div>
</div>
</div>
</div>
</div>
1条答案
按热度按时间ss2ws0br1#
您需要jquery和bootstrap。只需使用以下命令启用 accordion 效果:
更新
此javascript将使用输入文本自动更新panel-title
http://jsfiddle.net/2RV7T/1/