gajus/wholly

Add selection option

Open

#9 geöffnet am 2. Aug. 2019

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (29 Forks)github user discovery
enhancementhelp wanted

Repository-Metriken

Stars
 (201 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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

Contributor Guide