summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAleš Smodiš <aless@guru.si>2015-10-02 12:22:01 +0200
committerAleš Smodiš <aless@guru.si>2015-10-02 12:22:01 +0200
commit75a8fc81c1b49a9b2ad610e801f56b3f05d13d00 (patch)
treec72c6c273ec2266be68bcbe9f4e0b653b7d4749a /js
parentd46fec9f483db0e8cf6cf5672289b6222043ee83 (diff)
Prepend instead of append new hints and bold the first shown hint.
Diffstat (limited to 'js')
-rw-r--r--js/codeq/hint.js15
1 files changed, 8 insertions, 7 deletions
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 = $('<div class="hint-static-group"></div>');
jqButton = $('<a class="hint-static-link" ' + ta(trButton) + '></a>');
- jqHints.append(jqContainer);
+ jqHints.prepend(jqContainer);
jqContainer.append(jqButton);
jqButton.on('click', function () {
nextJqHint();