But most suitable for MCQs (Multiple
Choice Question) or Fill in the blank or any kind of question, so you can hide
answer till the visitor click on the “Show Answer"
Here is the Old one version, you can also apply This One.
So here the tutorial step be
step
Step 1. Sign in to blogger dashboard.
Step 2. Click on "make a New Post" ( For testing purpose )
Step 4. Change to HTML instead of Compose. ( As shown in below image).
Step 5. Copy the Below Code and past it Here ( In above image )
<div
style="margin: 5px;"><br /> <div
class="smallfont" style="margin-bottom:
2px;"><i><span style="font-weight: bold;">Put your Question/Text Here</span></i><input
value="Show Answer / Explanation"
style="margin: 0px; padding: 0px; width: 180px;
font-size: 14px;" onclick="if
(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display
!= '') {
this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display
= ''; this.innerText = ''; this.value = 'Hide Answer
/ Explanation'; } else {
this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display
= 'none'; this.innerText = ''; this.value = 'Show
Answer / Explanation'; }" type="button"/><br
/> </div><br /> <div class="alt2"
style="border: 1px inset ; margin: 0px; padding: 6px;"><br
/> <div style="background-color: #ebebff; display: none;"> Text which you want to show and hide
</div></div></div>
|
Customization:
Change the text in pink color
(Put your Question/Text Here) what ever you want.
Change the text in Red and Blue Color for what you want to show instead of
Show
Answer / Explanation and Hide Answer
/ Explanation
Change the "180px" for box width
Change the text size ( Box text size .e show/hide answer) with "14px" i.e 16 px ,18 px etc.
Change the background color with #ebebff
Change the text "Text which you want to show and hide" or whatever you want to show and hide.
At last ( this would be more interesting, promise :))
When you put the above code in Text editor in HTML ( as shown in above image) then change the code in green color (
none) with yes , and then change Compose instead of HTML, so you can see the box, in which you can put text or images directly. ( but do not forget to change "yes" with "none" again, when you complete your text post)
Copy Right material : http://trickandtechniques.blogspot.com/