Skip to content

Instantly share code, notes, and snippets.

@RobertShippey
Created November 8, 2013 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertShippey/7376069 to your computer and use it in GitHub Desktop.
Save RobertShippey/7376069 to your computer and use it in GitHub Desktop.
<script>
function switchFrame(a) {
f = document.getElementById("preview");
l = document.getElementById("endLink");
if( f.src == a.href ) {
if( f.style.display == "inline" ) {
f.style.display = "none";
l.style.display = "none";
} else {
f.style.display = "inline";
l.style.display = "inline";
}
} else {
f.src = a.href;
l.href = a.href;
f.style.display = "inline";
l.style.display = "inline";
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment