You need to invoke test() before you can invoke test2(). Also, in your example you correctly invoked functions() and assigned it to testfunction, but then you did not do anything with it. copyright.js:14 Uncaught TypeError: this.decrease is not a function at HTMLAnchorElement. (copyright. js:14) at HTMLAnchorElement.dispatch (jquery-1.