Dynamic Load HTML Tab

I have a slide-box that I’d like each tab to load (with spinner animation) a html template from my ‘templates’ folder. Each tab will have a different html and I want the animation to show once the person swipes to that tab. Any ideas?