Skip to content

Instantly share code, notes, and snippets.

@srobbin
Created March 8, 2012 18:13
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 srobbin/2002441 to your computer and use it in GitHub Desktop.
Save srobbin/2002441 to your computer and use it in GitHub Desktop.
Approach Demo: Opacity
<!--
In this demo, there are a series of circular images.
Their opacity changes as you approach each individual one.
-->
<!-- Beginning styles -->
<style>
img.circle {
float: left;
height: 80px;
width: 80px;
opacity: 0.2;
filter: alpha(opacity=20);
zoom: 1;
z-index: 0;
}
</style>
<!-- The elements (there are 40 of them) -->
<img class="circle" src="http://farm3.static.flickr.com/2526/4011568848_ff5aeeefb8_o.jpg" />
<!--
Approach
Note: jQuery is already included in this page.
-->
<script>
$("img.circle").approach({
opacity: 0.8
}, 100);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment