On the whole, I think you notneed to work on keeping it simple.
I would not write my own cross-browser event handling function if I use jQuery, I would leverage what jQuery provides.
This:
/* standard JS */ function InitStandard(jQuery) { //get device information this.device = new Device(); // initialise jQuery, if device is capable if (this.device.quality === 1) { this.jqueryPlugins = new InitJquery(jQuery); } } /* initialise standard JS on load and pass in the jQuery object */ (function init(jQuery) { var js = new InitStandard(jQuery); }(jQuery));
could be
(function InitStandard(jQuery) { //get device information this.device = new Device(); // initialise jQuery, if device is capable if (this.device.quality === 1) { this.jqueryPlugins = new InitJquery(jQuery); } }(jQuery));
Because you are not using
var js
anywhere.
Also,1
should be assigned to a properly named constant likeADVANCED_DEVICE
addEvent(window, 'load', init);
could be$( init )