代碼如下:
<script src="/js/jquery-1.8.0.min.js?1.1.9" type="text/javascript"></script>
<script src="/js/store.js?1.1.9" type="text/javascript"></script>
<script src="/js/jquery.resizableColumns.js?1.1.9" type="text/javascript"></script>
二、TABLE
代碼如下:
<table id="myTable" border="1">
<thead>
<tr>
<th data-resizable-column-id="a"><input type="checkbox" /></th>
<th data-resizable-column-id="b">欄目類型 </th>
<th data-resizable-column-id="c">活動名稱 </th>
<th data-resizable-column-id="d">狀態 </th>
<th data-resizable-column-id="e">操作選項</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" /></td>
<td>青春日記</td>
<td>2014年度青春日記征文 </td>
<td>提交 </td>
<td>審核</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td>我和孩子的成長故事</td>
<td>成長故事 </td>
<td>通過 </td>
<td>審核</td>
</tr>
</tbody>
</table>
以上html只是作為Demo 并不是我項目中所實際使用的,并且在測試的時候 也未能實現。郁悶...
三、實現表格可拖動
代碼如下:
<script type="text/javascript">
$(function(){
$("#myTable").resizableColumns({
store: window.store
});
})
</script>
在項目使用過程中 發現無需引入store.js <th>也無需data-resizable-column-id屬性
并且$("#myTable").resizableColumns();也可實現功能
所需文件下載地址:http://xiazai.jb51.net/201405/yuanma/jquery-resizableColumns.zip
分別解壓兩個文件
jquery.resizableColumns.js在jquery-resizable-columns-gh-pages\dist路徑下
store.js在store.js-master路徑下
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com