From d4af09c72a2ab9cfd267f66379f037aa557a7b13 Mon Sep 17 00:00:00 2001 From: Jason White Date: Wed, 2 Dec 2015 14:05:22 -0500 Subject: [PATCH] #133 hiding hint on change of lesson/loesson load --- .../src/main/webapp/js/goatApp/view/HintView.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webgoat-container/src/main/webapp/js/goatApp/view/HintView.js b/webgoat-container/src/main/webapp/js/goatApp/view/HintView.js index a9bc57f8d..cbe18e601 100644 --- a/webgoat-container/src/main/webapp/js/goatApp/view/HintView.js +++ b/webgoat-container/src/main/webapp/js/goatApp/view/HintView.js @@ -16,7 +16,7 @@ function($, this.curHint=0; this.collection = new HintCollection(); this.listenTo(this.collection,'loaded',this.onModelLoaded); - + this.hideHints(); }, render:function() { @@ -37,6 +37,12 @@ function($, this.trigger('hints:loaded',{'helpElement':'hints','value':true}) }, + hideHints: function() { + if (this.$el.is(':visible')) { + this.$el.hide(350); + } + }, + showNextHint: function() { this.curHint = (this.curHint < this.collection.length -1) ? this.curHint+1 : this.curHint; this.hideShowPrevNextButtons();