Call a function each time i change the pages of the table.

Call a function each time i change the pages of the table.

anxiousanxious Posts: 11Questions: 0Answers: 0
edited May 2010 in General
Hello,

i've a function who transforms numbers as stars. Works fine,

but as soon as i change the page of the table, the stars are no longer displayed, so how can i call my function again to render the new numbers as stars .

i tryed :

[code]$('recap_next .fg-button').click(function(){
$('span.stars').stars();
});[/code]

but it doesn't work.

Thanks

Replies

  • anxiousanxious Posts: 11Questions: 0Answers: 0
    no ideas ?

    ='(
  • anxiousanxious Posts: 11Questions: 0Answers: 0
    :up:
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I would guess that this is because you are running this function once the DataTable has initialised? Have a look at the FAQ entitled "My events don't work on the second page" (top right): http://datatables.net/faqs . I think the answer depends on how you are setting this up - but you will probably have to use either fnGetNodes() and/or fnUpdate() :-)

    Allan
This discussion has been closed.