free javascript code about: - fade in/fade out with DIV - fade in/out picture slideshow hope they're useful
Use JQuery, super easy and you don't need two files to do it (ie: prototype+scriptaculous) Example (assuming you already got the full markup, div styled, etc) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Toggle</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#clickme').bind("click", function(e){ $('#theDiv').toggle('slow'); }); }); </script> <style type="text/css"> html * { outline: none; margin: 0px; padding: 0px; } body { background: #fff none no-repeat 0 0; } #theDiv { display: none; width: 400px; height: 300px; border: 1px solid black; } </style> </head> <body> <div id="theDiv">Some Stuff</div> <input type="button" id="clickme" value="Click Me!"/> </body> </html> Code (markup): live example : http://kbeezie.com/examples/toggle.php Alternatively you can skip the whole script block (still gota include jquery.js though) and use <input type="button" onclick="javascript:$('#theDiv').toggle();" value="Click Me!"/> But I like to bind the events rather than doing things inline.