#133 hiding hint on change of lesson/loesson load

This commit is contained in:
Jason White 2015-12-02 14:05:22 -05:00
parent e530be6e3e
commit d4af09c72a

View File

@ -16,7 +16,7 @@ function($,
this.curHint=0; this.curHint=0;
this.collection = new HintCollection(); this.collection = new HintCollection();
this.listenTo(this.collection,'loaded',this.onModelLoaded); this.listenTo(this.collection,'loaded',this.onModelLoaded);
this.hideHints();
}, },
render:function() { render:function() {
@ -37,6 +37,12 @@ function($,
this.trigger('hints:loaded',{'helpElement':'hints','value':true}) this.trigger('hints:loaded',{'helpElement':'hints','value':true})
}, },
hideHints: function() {
if (this.$el.is(':visible')) {
this.$el.hide(350);
}
},
showNextHint: function() { showNextHint: function() {
this.curHint = (this.curHint < this.collection.length -1) ? this.curHint+1 : this.curHint; this.curHint = (this.curHint < this.collection.length -1) ? this.curHint+1 : this.curHint;
this.hideShowPrevNextButtons(); this.hideShowPrevNextButtons();