every is not a function
every is not a function
wilsontc
Posts: 6Questions: 2Answers: 1
I get a console error that 'every' is not a function. I'm trying to use it to see if any columns are hidden. In the following coffeescript method, length reports the correct number of columns, but then I get the 'every' error. 'msTable' is the datatable instance returned from DataTable().
anyHidden = ->
console.log "msTable.columns().data()length " + msTable.columns().data().length
hiddenCols = false
msTable.columns().every ->
if !this.visible()
hiddenCols = true
return hiddenCols
This is on datatables 1.10.3.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The documentation for iterator() explains that every() is available in 1.10.6.
Yup -
rows().every()
was introduced in 1.10.6.Allan