jQuery實(shí)現(xiàn)鼠標(biāo)可拖動調(diào)整表格列寬度
更新時(shí)間:2014年05月26日 09:38:55 作者:
這篇文章主要介紹了通過jQuery實(shí)現(xiàn)鼠標(biāo)可拖動調(diào)整表格列寬度,需要的朋友可以參考下
實(shí)現(xiàn)鼠標(biāo)可拖動調(diào)整表格列寬度 如圖:
一、引入文件:
<script src="/js/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/js/store.js" type="text/javascript"></script>
<script src="/js/jquery.resizableColumns.js" 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">狀態(tài) </th>
<th data-resizable-column-id="e">操作選項(xiàng)</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 并不是我項(xiàng)目中所實(shí)際使用的,并且在測試的時(shí)候 也未能實(shí)現(xiàn)。郁悶...
三、實(shí)現(xiàn)表格可拖動
<script type="text/javascript">
$(function(){
$("#myTable").resizableColumns({
store: window.store
});
})
</script>
在項(xiàng)目使用過程中 發(fā)現(xiàn)無需引入store.js <th>也無需data-resizable-column-id屬性
并且$("#myTable").resizableColumns();也可實(shí)現(xiàn)功能
所需文件下載地址:http://xiazai.jb51.net/201405/yuanma/jquery-resizableColumns.zip
分別解壓兩個(gè)文件
jquery.resizableColumns.js在\jquery-resizable-columns-gh-pages\dist路徑下
store.js在store.js-master路徑下

一、引入文件:
復(fù)制代碼 代碼如下:
<script src="/js/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/js/store.js" type="text/javascript"></script>
<script src="/js/jquery.resizableColumns.js" type="text/javascript"></script>
二、TABLE
復(fù)制代碼 代碼如下:
<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">狀態(tài) </th>
<th data-resizable-column-id="e">操作選項(xiàng)</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 并不是我項(xiàng)目中所實(shí)際使用的,并且在測試的時(shí)候 也未能實(shí)現(xiàn)。郁悶...
三、實(shí)現(xiàn)表格可拖動
復(fù)制代碼 代碼如下:
<script type="text/javascript">
$(function(){
$("#myTable").resizableColumns({
store: window.store
});
})
</script>
在項(xiàng)目使用過程中 發(fā)現(xiàn)無需引入store.js <th>也無需data-resizable-column-id屬性
并且$("#myTable").resizableColumns();也可實(shí)現(xiàn)功能
所需文件下載地址:http://xiazai.jb51.net/201405/yuanma/jquery-resizableColumns.zip
分別解壓兩個(gè)文件
jquery.resizableColumns.js在\jquery-resizable-columns-gh-pages\dist路徑下
store.js在store.js-master路徑下
相關(guān)文章
基于jquery的自定義鼠標(biāo)提示效果 jquery.toolTip
看到其它網(wǎng)站A標(biāo)簽title效果,心里癢癢,就想也用到自己網(wǎng)站上。 正好在學(xué)jquery 插件擴(kuò)展,就參照前輩代碼,自己動手寫了一個(gè)2010-11-11jQuery插件EnPlaceholder實(shí)現(xiàn)輸入框提示文字
EnPlaceholder插件支持密碼框哦!實(shí)際對比同類的placeholder插件在ie等瀏覽器下效果要好很多!下面我們來具體探討下此插件的使用方法吧。2015-06-06jquery picswitch圖片焦點(diǎn)圖展示效果
jquery pictureswitch制作圖片展示效果實(shí)現(xiàn)代碼,對于想用jquery實(shí)現(xiàn)焦點(diǎn)圖效果的朋友可以參考下。2010-05-05jQuery實(shí)現(xiàn)限制textarea文本框輸入字符數(shù)量的方法
這篇文章主要介紹了jQuery實(shí)現(xiàn)限制textarea文本框輸入字符數(shù)量的方法,涉及jQuery鍵盤事件及頁面元素的相關(guān)操作技巧,需要的朋友可以參考下2015-05-05