I've got a Rails app utilizing pjax (http://pjax.heroku.com/) so that my header and navbar don't ever reload. It's all fine and dandy and working, BUT in one of my views I'm using a data table (http://datatables.net). The data table works great when you first load up the page, but if you navigate away to another page and then come back, the table doesn't "reinitiate", so it doesn't work and everything looks like crap. Apparently it's because the data tables js file isn't getting loaded up again due to pjax.
Here's what I've got:
//= require jquery
//= require jquery_ujs
//= require pjax
//= require_tree .
In the head of application.html.erb I have and then wrapped the in a div with "data-pjax-container ".
Then in a separate custom.js file, this is what initiates the table: