Step 1
Download and unzip the latest jQuery shadowOn file.

Step 2
Add references to javascript files needed in your html file:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.guid.js"></script>
<script type="text/javascript" src="js/jquery.dotimeout.js"></script>
<script type="text/javascript" src="js/jquery.shadowon.min.js"></script>


Step 3
Implementation of shadowOn
<script type="text/javascript">
   $(document).ready(function () {
      $("#div1").shadowOn();
      $("#div2").shadowOn( { imageset: '88' } );         
   });
</script>
...
<div id="div1" style="width:200px;height:200px;background-color:blue;"></div>
<div id="div2" style="width:200px;height:200px;background-color:green;"></div>


shadowOn settings
$(".shadowon").shadowOn({
    imagepath: "images", //Path to the shadowOn image folders
    imageset: "4", //Shadow to use, 1 to 88
    autoresize: true, //When the browser or the element is resized the shadow will automatically refresh itself  
    resizetimer: 250 //Timer to check it the resize have happened, set in milliseconds
});

Last edited Jul 5, 2010 at 6:06 PM by davehan, version 1

Comments

chrisdavies12 Dec 14, 2012 at 8:48 PM 
internet Explorer anda firefox also throwing a lot of errors about JQuery not being defined in the follwing three scripts:
<script type="text/javascript" src="js/jquery.guid.js"></script>
<script type="text/javascript" src="js/jquery.dotimeout.js"></script>
<script type="text/javascript" src="js/jquery.shadowon.min.js"></script>

chrisdavies12 Dec 14, 2012 at 8:40 PM 
After much beating myself up over this, finally got it working, I say finally because I'm pedantic and refuse to be beaten, no thanks to the poor instructions. output varies greatly across browsers, firefox, internet explorer ok, but with google chrome the bottom corners of the shadow fail. Shame, cos if it worked perfectly, this would save a lot of dev some work. Not that I'm really complaining though, davehan has obviously worked hard on this. I couldn't have done it to be sure