gajus/wholly

Add selection option

Open

#9 创建于 2019年8月2日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)JavaScript (29 fork)github user discovery
enhancementhelp wanted

仓库指标

Star
 (201 star)
PR 合并指标
 (PR 指标待抓取)

描述

This will be good if the cells selection is set as an option. For example:

 defaultOptions = {
     highlightHorizontal: null,
     highlightVertical: null,
     selection: 'td, th'
 };

And in code:

table.on('mouseenter', options.selection, function () {
...
}

table.on('mouseleave', options.selection, mouseleave);

So user can decide wich cells are processed.

$('table').wholly({
    highlightHorizontal: 'horizontal-class-name',
    highlightVertical: 'vertical-class-name',
    selection: 'td:not(".skip")'
})

贡献者指南