Sign in blog > dashboard > design > add a gadget > HTML / JavascriptCopy kode dibawah ini dan paste di kolom HTML / Javascript yang kosong itu.
<script language="javascript">Lets Study:
function toggle() {
var ele = document.getElementById("toggleText");
var text = document.getElementById("displayText");
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = "THIS";
}
else {
ele.style.display = "block";
text.innerHTML = "THIS";
}
}
</script>
CLICK <a id="displayText" href="javascript:toggle();">THIS</a> PLEASE
<div id="toggleText" style="display: none">
Write anything here.
</div>
Sign in blog > dashboard > templateCopy kode dibawah dan paste di tempat yang diinginkan.
<script language="javascript">function toggle() {var ele = document.getElementById("toggleText");var text = document.getElementById("displayText");if(ele.style.display == "block") {ele.style.display = "none";text.innerHTML = "THIS";}else {ele.style.display = "block";text.innerHTML = "THIS";}}</script>CLICK <a id="displayText" href="javascript:toggle();">THIS</a> PLEASE<div id="toggleText" style="display: none">Write anything here.</div>
Labels: tutorial