If you do
this.activateMobile = function () {};
the function is not part of the prototype, which means that a subclass of HeaderNav
will not get this function (unless you do an explicit super call). Setting a property directly on this
only sets that property for that instance
To add a function to a prototype do:
function HeaderNav() {}
HeaderNav.prototype.activateMobile = function () {
alert('activateMobile');
};