Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.0k 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
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
...