var page={
init:function(){
this.initEvents()
},
bindEvent: function (target, type, name) {
$(target).bind(type, function (e) {
e.preventDefault();
name(e)
})
},
initEvents: function () {
this.bindEvent(".pic-egg1", "click", this.showDiag)
this.bindEvent(".pic-egg2", "click", this.showDiag)
},
showDiag: function () {
this.hideDiag()
},
hideDiag:function(){
console.log("")
}
}
Controller reports this error
hideDiag is not a function