I have a page, when the user clicks the title, the following divs are displayed.
I want to say somehow whether any other divs will be displayed: then the block will first set them to display.
I thought maybe I could do it like this, but I think I'm using it in the wrong context. The code is worthless.
HTML:
<div id="recordbox" class="home" style="z-index: 2; background: #f2f2f2;"> <div class="jlkb"></div> <div id="recordlist"> <div class="jlmain j1"> <div class="jlhead"> <div class="jlleft"> <li>存款金额: 10.00</li> <a>2016-09-21 18:39:02</a> </div> <div class="jlright"> <li class=""></li> </div> </div> <div class="jldetail" style="display:none"> <p>充值方式:在线订单号:20160921183902323</p> <p>状态:待支付</p> </div> </div> </div> </div>
JQUERY:
function BindList() { $(".jlmain").unbind("click"); $(".jlmain").click(function () { $(this).find(".jlright li").toggleClass("jlmain1"); $(this).find(".jldetail").slideToggle("fast"); }) }
source share