From 75a8fc81c1b49a9b2ad610e801f56b3f05d13d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Fri, 2 Oct 2015 12:22:01 +0200 Subject: Prepend instead of append new hints and bold the first shown hint. --- js/codeq/hint.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'js/codeq') diff --git a/js/codeq/hint.js b/js/codeq/hint.js index 331c822..643a3a4 100644 --- a/js/codeq/hint.js +++ b/js/codeq/hint.js @@ -220,14 +220,15 @@ } } else { - jqContainer.append(jq); + jqContainer.prepend(jq); } codeq.tr.translateDom(jq); - // scroll into view if overflowing - deltaHeight = jqHints.height() - jqHintsContainer.height(); - if (deltaHeight > 0) { - jqHintsContainer.scrollTop(deltaHeight); - } + //// scroll into view if overflowing + //deltaHeight = jqHints.height() - jqHintsContainer.height(); + //if (deltaHeight > 0) { + // jqHintsContainer.scrollTop(deltaHeight); + //} + jqHintsContainer.scrollTop(0); }, jqContainer, jqButton; @@ -235,7 +236,7 @@ // hint sequence jqContainer = $('
'); jqButton = $(''); - jqHints.append(jqContainer); + jqHints.prepend(jqContainer); jqContainer.append(jqButton); jqButton.on('click', function () { nextJqHint(); -- cgit v1.2.1