gajus/wholly

Add selection option

Open

#9 aperta il 2 ago 2019

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (29 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (201 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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")'
})

Guida contributor