Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
575 views
in Q2A Core by
I want to hide the answer by default on the questions page and it should be visible only when someone click on a similar button as "post answer" Like " View answer" ... Then only the answer should be visible.

Please advise which file and what code can be done for this?
Q2A version: 1.85

1 Answer

+3 votes
by

it require some js and css

css:

.qa-a-list {

    display: none;

}

.qa-a-list.active{

    display: block;

}

 js:

document.getElementById("a_list_title").onclick = function () {

    document.getElementById("a_list").classList.toggle("active");

}

by
Which file I need to do these changes... Sorry i am new to programming... Can you tell me exact file name where these changes should be done?
by
†hanks great fix
by
+2
@madanswer.ask
Admin/Layout -> Custom HTML in <head> section of every page:

<style> css </style>
<script> js </script>
by
how to see the answer again
by
it works but how to see that answer if the questioner want to see the answer
by
suppose i am a teacher, i have ask a question(Answer this question......) and student sent me the answer but i (teacher) only want to see the answer and other student cant see that answer
by
@momin please help me
by
use google classroom
...