[tor-commits] [nyx/master] Only open/close FAQ entry when clicking question

atagar at torproject.org atagar at torproject.org
Sat Aug 5 01:18:26 UTC 2017


commit d58594db4215e6ec6ff90a686ef2270103a51361
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Jul 28 16:42:00 2017 -0700

    Only open/close FAQ entry when clicking question
    
    FAQ entries shouldn't close when the answer is clicked. Otherwise you can't
    copy text.
---
 web/index.html | 4 ++--
 web/styles.css | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/web/index.html b/web/index.html
index bae6170..e1c3c6d 100644
--- a/web/index.html
+++ b/web/index.html
@@ -207,8 +207,8 @@
 
       // show/hide for FAQ questions
 
-      $('.question').click(function() {
-        var answer = $(this).find('.answer');
+      $('.question > span').click(function() {
+        var answer = $(this).parent().find('.answer');
 
         if (answer.is('.open')) {
           answer.animate({'height': '0'}, 100);
diff --git a/web/styles.css b/web/styles.css
index ba7ddd5..081ff27 100644
--- a/web/styles.css
+++ b/web/styles.css
@@ -168,6 +168,7 @@ FAQ Page
 }
 
 .answer {
+  cursor: default;
   height: 0px;
   overflow: hidden;
   padding: 0px;
@@ -175,7 +176,7 @@ FAQ Page
 
 .answer img {
   float: right;
-  margin-top: 0px;
+  margin-top: 5px;
   margin-left: 20px;
 }
 





More information about the tor-commits mailing list