在我的table
中,如果我点击表格标题数据将被排序。该标题中有复选框,当我点击标题标题时,该复选框也会点击。我想在点击标题标题时才进行排序。
这是表头代码。
<thead>
<tr>
<?php if ($folder_id && $sub_folders) { ?>
<th width="2%"><input type="checkbox" id="selectall" class="selected_check"></th>
<?php } ?>
<?php if (isset($sub_folders)) { ?><?php } else { ?>
<th width="5%"></th>
<?php } ?>
<th width="5%"></th>
<th class="vf-icon"></th>
<th ><?php if (isset($sub_folders)) { ?><a href="<?php echo base_url('files/browse') . "/" . $folder_id . "/title"; ?>" style="cursor: pointer;"><?php } else { ?><a href="<?php echo base_url('files/browse') . "/0/title"; ?>" style="cursor: pointer;"><?php } ?>Title</a></th>
<th width="20%" class="text-center"><?php if (isset($sub_folders)) { ?><a href="<?php echo base_url('files/browse') . "/" . $folder_id."/size"; ?>" style="cursor: pointer;"><?php } else { ?><a href="<?php echo base_url('files/browse') . "/0/size"; ?>" style="cursor: pointer;"><?php } ?>Size</a></th>
<th width="20%" class="text-center"><?php if (isset($sub_folders)) { ?><a href="<?php echo base_url('files/browse') . "/" . $folder_id."/last_updated"; ?>" style="cursor: pointer;"><?php } else { ?><a href="<?php echo base_url('files/browse') . "/0/last_updated"; ?>" style="cursor: pointer;"><?php } ?>Last Updated</a></th>
<th width="20%" class="text-center"><?php if (isset($sub_folders)) { ?><a href="<?php echo base_url('files/browse') . "/" . $folder_id."/created_by"; ?>" style="cursor: pointer;"><?php } else { ?><a href="<?php echo base_url('files/browse') . "/0/created_by"; ?>" style="cursor: pointer;"><?php } ?>Created By</a></th>
<th></th>
</tr>
</thead>
答案 0 :(得分:1)