我在看: 使用 jQuery – jExpand 插件扩展表格行。
http://www.jankoatwarpspeed.com/expand-table-rows-with-jquery-jexpand-plugin/
这是我想要的,但我只想通过箭头图标切换行,而不是单击整行。
我已经尝试更改 $("#report tr.odd").click(function(){
以获取箭头类,但没有任何效果。
谁能给我指出正确的方向!
最佳答案
你需要做两个改变
CSS 更改:
#report tr.odd td { background:#fff url(row_bkg.png) repeat-x scroll center left; }
.arrow { cursor:pointer;}
JavaScript 变化:
$(".arrow").click(function(){
$(this).parents("tr").next("tr").toggle();
$(this).toggleClass("up");
});
关于javascript - jQuery – jExpand 插件 – 通过图像展开?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20709407/