Reinitializing page scripts after SmoothState.Js page change
问题 I am using SmoothState.js for page transitions and it works fine and loads the new pages with ajax. However, I have JS scripts on each page that need to be reinitialized and I have not been able to get them to always be present on page transitions. Based on the FAQ: smoothState.js provides the onAfter callback function that allows you to re-run your plugins. This can be tricky if you're unfamiliar with how AJAX works. When you run a plugin on $(document).ready(), it's going to register only