0

I already tried, data('columnIndex') but it gives me undefine.

I need to get the value of data-column-index for my custom reOrder function.

$('#columnAge').data('column-index') // undefined
$('#columnAge').data('columnIndex') // get the value of data-index instead

Thanks

2
  • Hi and welcome. Please, can you post some code and and example of what you want exactly? Commented Jun 3, 2020 at 7:06
  • updated above, I just want to get the value of attr data-column-index in DataTables. Commented Jun 3, 2020 at 7:09

1 Answer 1

1

Try next code:

$(#columnAge).attr("data-column-index")

I hope that work. It worked fine for my case.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.