在我的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>
提供排序代碼或任何可能有助於解決問題的代碼 – madalinivascu
@ madalin ivascu找到答案謝謝你的努力。 –