需要准备:1. jquery 1.6.2版本(高的版本不能支持,不知原因);
2. colResizable-1.3.min.js;
*大家可以到我的网盘下载(http://pan.baidu.com/s/1jGGVqqM);
使用步骤:1. 先引入jquery1.6.2版本,释放1.6.2版本中对$符的控制;
- var jq162 = $.noConflict();//这里我为了看得清晰,直接把$给换成jq162;
var jq162 = $.noConflict();//这里我为了看得清晰,直接把$给换成jq162;
2. 引入 colResizable-1.3.min.js;
3. 插入如下JS代码以实现功能://我是直接把这段代码也给放到colResizable-1.3.min.js里面了,这样就不用再单独引入JS了,也不用再页面中插JS代码了
jq162(function(){
var onSampleResized = function(e){
var columns = jq162(e.currentTarget).find("th");
var msg = "columns widths: ";
columns.each(function(){ msg += jq162(this).width() + "px; "; })
jq162("#sample2Txt").html(msg);
};
jq162("#sample2").colResizable({
liveDrag:true,
gripInnerHtml:"<div class='grip'></div>",
draggingClass:"dragging",
onResize:onSampleResized});
});
4. 使用时只需在需要调整的table上加上对应的ID即可;
5. 引入高版本的jquery;
需要准备:1. jquery 1.6.2版本(高的版本不能支持,不知原因);
2. colResizable-1.3.min.js;
*大家可以到我的网盘下载(http://pan.baidu.com/s/1jGGVqqM);
使用步骤:1. 先引入jquery1.6.2版本,释放1.6.2版本中对$符的控制;
- var jq162 = $.noConflict();//这里我为了看得清晰,直接把$给换成jq162;
var jq162 = $.noConflict();//这里我为了看得清晰,直接把$给换成jq162;
2. 引入 colResizable-1.3.min.js;
3. 插入如下JS代码以实现功能://我是直接把这段代码也给放到colResizable-1.3.min.js里面了,这样就不用再单独引入JS了,也不用再页面中插JS代码了
jq162(function(){
var onSampleResized = function(e){
var columns = jq162(e.currentTarget).find("th");
var msg = "columns widths: ";
columns.each(function(){ msg += jq162(this).width() + "px; "; })
jq162("#sample2Txt").html(msg);
};
jq162("#sample2").colResizable({
liveDrag:true,
gripInnerHtml:"<div class='grip'></div>",
draggingClass:"dragging",
onResize:onSampleResized});
});
4. 使用时只需在需要调整的table上加上对应的ID即可;
5. 引入高版本的jquery;
http://www.battlenet.com.cn/wow/zh/forum/topic/17431643852
http://www.battlenet.com.cn/wow/zh/forum/topic/17431643853
http://www.battlenet.com.cn/wow/zh/forum/topic/17431643854
http://www.battlenet.com.cn/wow/zh/forum/topic/17431643855
http://www.battlenet.com.cn/wow/zh/forum/topic/17432453542
http://www.battlenet.com.cn/wow/zh/forum/topic/17431643856
http://www.battlenet.com.cn/wow/zh/forum/topic/17432453543
http://www.battlenet.com.cn/wow/zh/forum/topic/17432963403
http://www.battlenet.com.cn/wow/zh/forum/topic/17433053361
http://www.battlenet.com.cn/wow/zh/forum/topic/17433053362
http://www.battlenet.com.cn/wow/zh/forum/topic/17431643902
http://www.battlenet.com.cn/wow/zh/forum/topic/17433663284
http://www.battlenet.com.cn/wow/zh/forum/topic/17433053363
http://www.battlenet.com.cn/wow/zh/forum/topic/17433373279
http://www.battlenet.com.cn/wow/zh/forum/topic/17433663291
http://www.battlenet.com.cn/wow/zh/forum/topic/17433053384
http://www.battlenet.com.cn/wow/zh/forum/topic/17432553491
http://www.battlenet.com.cn/wow/zh/forum/topic/17432553492
http://www.battlenet.com.cn/wow/zh/forum/topic/17431643943
http://www.battlenet.com.cn/wow/zh/forum/topic/17433843262
http://www.battlenet.com.cn/wow/zh/forum/topic/17433373296