stackoverflow question - http://stackoverflow.com/questions/14389974/how-do-i-get-different-tabs-to-load-separate-javascript-files. Note that it’s not necessarily a good approach to reload the script on each tab change.