-1

I've used a template boostrap from themeforest, and they're really awesome but the problem is bootstrap is quite difficult to use.

In the left menu, it's divided into some collapsble ul and many li. Please, help me to catch "event" when the group ul is collapsed or expanded.

<ul class="nav nav-pills nav-stacked" style="margin-top:-15px;" >
    <li class="parent active">
        <a href="#">
            <i class="fa fa-home"></i>
            <span>Tiêu chí tìm kiếm</span>
        </a>
        <ul class="children">
            <li>
                <div class="input-group">
                    <input type="text" class="form-control" placeholder="Chọn ngày theo dõi từ" id="datepickerFrom">
                    <span class="input-group-addon">
                        <i class="glyphicon glyphicon-calendar"></i>
                    </span>
                </div><!-- input-group -->              
            </li>
            <li>
                <div class="input-group">
                     <input type="text" class="form-control" placeholder="Chọn ngày theo dõi đến" id="datepickerTo">
                     <span class="input-group-addon">
                         <i class="glyphicon glyphicon-calendar"></i>
                     </span>
                </div><!-- input-group -->              
            </li>
        </ul>
    </li>
</ul>

In this example, "Tiêu chí tìm kiếm" is what I want to handle when user click into this row to collapse its children li.

jam
  • 3,640
  • 5
  • 34
  • 50
Bằng Rikimaru
  • 1,512
  • 2
  • 24
  • 50
  • 1
    hi, please check [this](http://stackoverflow.com/questions/19936572/binding-to-collapse-event-in-twitter-bootstrap-3) answer – fDruga Nov 07 '14 at 09:36
  • What version of Bootstrap are they using? If it's version 3, there's some documentation on the events in http://getbootstrap.com/javascript/#collapse-usage. For v 2.3.2, look at http://getbootstrap.com/2.3.2/javascript.html#collapse – Olly Hodgson Nov 07 '14 at 09:39

1 Answers1

1

I would suggest you to simply use the accordion for bootstrap.

On google you'll get this.

It is easy to understand and implement the same.

Suraj
  • 2,423
  • 12
  • 39
  • 75