Skip to content

Instantly share code, notes, and snippets.

@fixlr
Created April 28, 2011 18:17
Show Gist options
  • Save fixlr/946924 to your computer and use it in GitHub Desktop.
Save fixlr/946924 to your computer and use it in GitHub Desktop.
<!-- First, let's define a CSS class to hide things. -->
<style type="text/css">
.hidden { display: none; }
</style>
<!-- Now let's see what happens when we execute some
javascript within the hidden element. -->
<div class="hidden">
I am hidden.
<script>
alert("I am running inside a hidden div!");
</script>
</div>
<!-- Well? -->
@fixlr
Copy link
Author

fixlr commented Apr 28, 2011

Spoiler: Yes, it runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment