To make your JavaScript more manageable, you should have a template engine of choice. I have been using
Mustache.js for quite some time and love it. Instead of doing this:
var content = 'This is a ' + testA + ' test to ' + testB + ' put strings ' + testC;
You really should be doing this:
var template = 'This is a {{testA}} test to {{testB}} put strings {{testC}}';
var data = { testA: 'blog', testB: 'efficiently', testC: 'together' };
var content = Mustache.render(template, data);
Sure it looks like more lines of code, but throw ...