mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
Fix interlinear tooltip toggles and align theme colors
This commit is contained in:
@@ -775,6 +775,11 @@ document.addEventListener('click', function(e) {
|
||||
function expandSelectedWord() {
|
||||
const words = getWordsInVerse(selectedVerseIndex);
|
||||
if (selectedWordIndex >= 0 && selectedWordIndex < words.length) {
|
||||
document.querySelectorAll('.word-unit.expanded').forEach(function(word) {
|
||||
if (word !== words[selectedWordIndex]) {
|
||||
word.classList.remove('expanded');
|
||||
}
|
||||
});
|
||||
toggleWord(words[selectedWordIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -965,6 +965,11 @@
|
||||
e.preventDefault();
|
||||
// Toggle word expansion
|
||||
if (selectedWordIndex >= 0 && words[selectedWordIndex]) {
|
||||
document.querySelectorAll('.word-unit.expanded').forEach(function(word) {
|
||||
if (word !== words[selectedWordIndex]) {
|
||||
word.classList.remove('expanded');
|
||||
}
|
||||
});
|
||||
words[selectedWordIndex].classList.toggle('expanded');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user