![]() ![]() ![]() ![]() ![]() |
Instant.js 1.5 allows you to add an instant picture effect (including tilt) to images on your webpages (alternatively: slided.js or filmed.js). It uses unobtrusive javascript to keep your code clean. It works in all the major browsers - Mozilla Firefox 1.5+, Opera 9+, Safari and IE6+. On older browsers, it'll degrade and your visitors won't notice a thing. CVI-lab: Get a fast impression of the effects and their illustration qualities. |
Download "instant.js" and include it into your webpage.
<script type="text/javascript" src="instant.js"></script>
To get the instant picture effect just add a class="instant" to the image (minimum dimension: 64x64).
If you want flexibility, use "cvi_instant_lib.js" instead of "instant.js". You can make your images respond to user actions (e.g. changing one or more options when the image is hovered over).
cvi_instant.defaultTilt = 'none'; //STR 'n|l|r'-'none|left|right'
cvi_instant.defaultShade = 33; //INT 0-100 (% opacity)
cvi_instant.defaultShadow = 33; //INT 0-100 (% opacity)
cvi_instant.defaultColor = '#f0f4ff'; //STR '#000000'-'#ffffff'
cvi_instant.defaultNoshade = false; //BOOLEAN
cvi_instant.defaultPreserve = false; //BOOLEAN
cvi_instant.add(image, options);
cvi_instant.add(document.getElementById("myimg"), { shadow: 75, shade: 10 });
cvi_instant.modify(image, options);
cvi_instant.modify(document.getElementById("myimg"), { tilt: "left" });
cvi_instant.remove(image);
Shows some of the things "instant.js" does.
First image with class = "instant itiltleft icolor000000 ishadow50" all other images with class = "instant" only...
In older browsers, the script degrades and your visitors won't notice a thing.
The inspiration for the script came from polaroid.rb.
Instant.js is distributed under this LICENSE. License permits free of charge use on non-commercial and private web sites only. There are also Commercial Software Licenses available.
Images used are copyrighted and are used for demonstration only.
cvi.netzgesta.de also visit CVI-lab, S5 Reloaded and AJAX-FilmDB