Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

Won't work on unloaded images


Project:Reflect jQuery
Version:1.0
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

The reflection will not work if the image isn't loaded when the code is first run. This can be worked around by testing each image with .complete and then calling the reflect function if complete returns true.

Please see this work around:

<script type="text/javascript">
$('img').ready(function() {
tryReflect();
});
function tryReflect()
{
var isReady = true;
$('img.reflect').each(function(){
if( !this.complete ){
// If there are images that haven't loaded flag to try again in a bit
isReady = false;
}else{
// If this image has finished loading then add the reflection and remove the class so it's not tested again
$(this).reflect({height: 0.3, opacity: 0.6}).removeClass("reflect");
}
});
if( !isReady )
{
// If we have uploaded images, try again in a bit
setTimeout('tryReflect();',300);
}
}
</script>