How can I get the button.dtsp-clearAll selector

How can I get the button.dtsp-clearAll selector

leprimoleprimo Posts: 25Questions: 4Answers: 0

Hello,

I would like to bind a function to these button. I am not able to address it correctly. I have already tried many possibilities in vain.
It would be very kind if someone could give me the decisive tip.
Thank you

Dirk

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    You can add an event handler, by just doing something like:

    $('button.dtsp-clearAll').on('click', function() { console.log('clicked') })
    

    or am I misunderstanding your question?

    Colin

  • leprimoleprimo Posts: 25Questions: 4Answers: 0

    Hi Colin,
    That's how I do it and I have already extended the selector, but there is no reaction to this SearchPanes-Button.
    That's why I asked, maybe there's a trick?

    Dirk

  • leprimoleprimo Posts: 25Questions: 4Answers: 0

    by the way, the clearAll event for the SearchPanes is executed

  • leprimoleprimo Posts: 25Questions: 4Answers: 0

    One more explanation:
    When clicking on the clearAll button I would like to reset the SearchPanes (that works) AND delete the DataTables-filter (for that I need the additional event).

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Are you using nightly builds or release builds? And can you please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.