How to get the value of a hidden footer column

How to get the value of a hidden footer column

kaluosikaluosi Posts: 19Questions: 6Answers: 0

Why $(table.column(0).footer()).html() works but $(table.column(0).footer()).val() don't work ??

$(table.column(0).footer()).html() give <input type="text" placeholder="whatever" size"10">

I wish to know the value of that input

I'm trying to check if there is any filter active but if you have some hidden columns you can't access the values of the filters with the id of the <th>

Thanks in advance
Carlos

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    It's probably because of how you've hidden it. This here works with text elements. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Cheers,

    Colin

  • kaluosikaluosi Posts: 19Questions: 6Answers: 0

    Thank you so much Colin. I've been studying the link you point out and I can't figure out why in my case

    $(table.column(5).footer()).text() does not work

    but I have found another solution to my problem in this other link:

    https://datatables.net/forums/discussion/22490

    table.column(5).search() works perfectly, even with hidden columns.

    Thanks!!

This discussion has been closed.