1

I am currently using this SB Admin as bootstrap UI.

I search for one of my problem and I found this one SO LINK. Below are my codes. I try to use the code in my link. But its not working.

var checkedRows = [];
    $('#dataTables-SalesMenu').on('check.bs.table', function (e, row) {
        debugger;
        checkedRows.push({ id: row.id, name: row.name });
        console.log(checkedRows);
    });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="panel-body">
  <div class="col-sm-12">
    <table class="table table-striped table-bordered table-hover table-responsive nowrap dataTable no-footer" role="grid" style="width: 100%;" id="dataTables-SalesMenu" aria-describedby="dataTables-SalesMenu_info">
      <thead>
        <tr role="row">
          <th class="sorting" tabindex="0" aria-controls="dataTables-SalesMenu" rowspan="1" colspan="1" aria-label="Menu: activate to sort column ascending" style="width: 400px;">
            Name
          </th>
          <th class="sorting" tabindex="0" aria-controls="dataTables-SalesMenu" rowspan="1" colspan="1" aria-label="Menu: activate to sort column ascending" style="width: 180px;">
            Position
          </th>
          <th class="alignRight sorting_desc" tabindex="0" aria-controls="dataTables-SalesMenu" rowspan="1" colspan="1" aria-label="Price: activate to sort column ascending" style="width: 180px;">
            Party
          </th>
          <th class="alignCenter sorting_disabled" rowspan="1" colspan="1" aria-label="Add To Tray" style="width: 90px;">
            Click to Vote
          </th>
        </tr>
      </thead>
      <tbody>
        <tr role="row" class="odd">
          <td>
            Name
          </td>
          <td class="alignRight sorting_2">
            Position
          </td>
          <td class="alignRight sorting_2">
            Party
          </td>
          <td class=" alignCenter">
            <center>
              <label>
                <input type="checkbox" value="" />
              </label>
            </center>
          </td>
        </tr>
        <tr role="row" class="even" style="color: white; background-color: rgb(82, 136, 75);">
        </tr>
      </tbody>
    </table>
  </div>
  <button id="buttonId">Heheheheh</button>
</div>

I try to search the .bs on my project but my problem is after a while of searching my VS is being NOT RESPONDING.

Community
  • 1
  • 1
KiRa
  • 924
  • 3
  • 17
  • 42

0 Answers0