jquery控制页面的展开和隐藏实现方法(推荐)
【jquery代码】
<script> require(["jquery","validate","bootstrap","lhgcalendar"],function($) { $(function(){ $("form").validate(); }); $(".up").click(function(){ $(this).parent().parent().parent().parent().next().slideToggle("slow"); }); }); </script>
【HTML代码】
<div class="panel panel-default"> <table class="table table-bordered"> <thead> <tr class=" active" id="a3"> <th width="15%" style="text-align:center;">加盟状态</th> <th width="25%" style="text-align:center;">申请表名称</th> <th width="25%" style="text-align:center;">审核情况</th> <th width="25%" style="text-align:center;">操作</th> <th width="10%" style="text-align:center;">隐藏/展开切换</th> </tr> </thead> <tbod> <tr style="text-align:center;" class=" active"> <td><strong class="text-warning">第1步:<? echo $stage->name;?></strong></td> <td><a href="#">《信息表》</a></td> <td>-</td> <td>-</td> <td> <span class="up text-info" ><i class="glyphicon glyphicon-chevron-down"style="padding:0px 5px 0 5px;"></i></span> </td> </tr> </tbody> </table> <div class="panel-body" style="display:none;"> <table class="table"> <tbody> <tr> <td>-</td> <td>-</td><pre name="code" class="html"> <td>-</td> </tr> </tbody> </table> </div> </div>
相关推荐
momode 2020-09-11
EdwardSiCong 2020-11-23
85477104 2020-11-17
hhanbj 2020-11-17
81427005 2020-11-11
seoppt 2020-09-13
honeyth 2020-09-13
WRITEFORSHARE 2020-09-13
84483065 2020-09-11
85477104 2020-08-15
83510998 2020-08-08
82550495 2020-08-03
tthappyer 2020-08-03
84901334 2020-07-28
tthappyer 2020-07-25
TONIYH 2020-07-22
tztzyzyz 2020-07-20
83510998 2020-07-18
81463166 2020-07-17