Fixes pagination issue

Fixes issue where prev/next button press would not reinitialize the
behavior of the prev/next button after the ajax content loaded.