add active class & add text
This commit is contained in:
parent
74cf7212d8
commit
0c27367b7a
|
@ -34,13 +34,13 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button tabindex="-1" class="btn" type="submit">搜索</button>
|
<button tabindex="-1" class="btn" type="submit">搜索</button>
|
||||||
<button tabindex="-1" data-toggle="dropdown" class="btn dropdown-toggle">
|
<button tabindex="-1" data-toggle="dropdown" class="btn dropdown-toggle">
|
||||||
<span class="caret"></span>
|
专题<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="javascript:void(0);" onclick="$('#code').val('');$('#search').submit()">所有专题</a></li>
|
<li><a href="javascript:void(0);" onclick="$('#code').val('');$('#search').submit()">所有专题</a></li>
|
||||||
<?php if(!empty($this->source)) { ?>
|
<?php if(!empty($this->source)) { ?>
|
||||||
<?php foreach($this->source as $v) { ?>
|
<?php foreach($this->source as $v) { ?>
|
||||||
<li><a href="javascript:void(0);" onclick="$('#code').val('<?= $v['id'] ?>');$('#search').submit()"><?= $v['code'] ?></a></li>
|
<li<?php echo ($this->code==$v['id'])?' class="active"':''; ?>><a href="javascript:void(0);" onclick="$('#code').val('<?= $v['id'] ?>');$('#search').submit()"><?= $v['code'] ?></a></li>
|
||||||
<?php } }?>
|
<?php } }?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue