MCPcopy Create free account
hub / github.com/breck7/scroll / _addClass

Function _addClass

external/.datatables.js:1338–1347  ·  view source on GitHub ↗
(el, name)

Source from the content-addressed store, hash-verified

1336
1337 // Similar to jQuery's addClass, but use classList.add
1338 function _addClass(el, name) {
1339 if (name) {
1340 name.split(" ").forEach(function (n) {
1341 if (n) {
1342 // `add` does deduplication, so no need to check `contains`
1343 el.classList.add(n)
1344 }
1345 })
1346 }
1347 }
1348
1349 /**
1350 * DataTables utility methods

Callers 3

_columnAutoClassFunction · 0.85
_fnCreateTrFunction · 0.85
_fnDrawFunction · 0.85

Calls 3

forEachMethod · 0.80
splitMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected