Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82433

How to disable a draw function on search

$
0
0

I am using the following code to place a page number next to a headline, using the data from the pagination. The headline is league. So, when on page 2 the headline reads league 2 and so on. It is working great. I am looking for a way to hide the added number when the search box is used because the number is no longer relevant as the table repopulates when the new data is displayed.
Not sure if what I am trying to do is possible or not, so any help would be welcome.

table.on( 'draw', function () {
    var info = table.page.info();
$('#tableInfo').html(
    'Sales League '+(info.page+1));
} );

Viewing all articles
Browse latest Browse all 82433

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>