Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SNIPPET to hide all answers on a StackExchange post, except the one linked to (hash anchor, eg. #id) if exists.
javascript:(function(){$(".answer").each(function(i,n){if(n.id!==('answer'+document.location.hash).replace(/#/,'-'))n.style.display="none"})})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment