Skip to content

Instantly share code, notes, and snippets.

@ridhotegar
Last active December 1, 2019 12:50
Show Gist options
  • Save ridhotegar/9910986de99db84d54534972cc32045f to your computer and use it in GitHub Desktop.
Save ridhotegar/9910986de99db84d54534972cc32045f to your computer and use it in GitHub Desktop.
Show Hide Post JS on Post Blog
<div>
<div style="margin-bottom: 2px;">
<b><small>klik ☛ </small></b><input 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'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="font-size: 10px; margin: 0px; padding: 0px; width: 60px;" type="button" value="Show" />
</div>
<div style="border: 1px inset; margin: 0px; padding: 0px;">
<div style="display: none;">
TEKS
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment