CVI
curl.js 1.2 allows you to add an page curl effect (inc. backside mask) to images on your webpages. 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.

Demonstration

Shows some of the things curl.js does.

First Image with class = "curl invert", others with class = "curl isizeN" (different sizes)...

beautiful girl

If you want flexibility, use "cvi_curl_lib.js" instead of "curl.js". You can make your curls respond to user actions (e.g. changing the curl size when the image is hovered over).

Click to add or remove curl
1
Move over to in/decrease curl
2
Move over to change curl
3
Mouse up/down to change curl
4

Setting Up

Download curl.js and include it into your webpage.

<script type="text/javascript" src="curl.js"></script>

Using It

To get the page curl effect just add a class="curl" to the image (minimum dimension: 64x64).

Classes

Scripting

If you want flexibility, use "cvi_curl_lib.js" instead of "curl.js". You can make your curls respond to user actions (e.g. changing the curl size when the image is hovered over).

Add image curl using Javascript
cvi_curl.add(image, options);
image should be an image element. options can contain a value for size, shadow, color or invert. The value for size and shadow should be between 0 and 100. The value for color should be between 0 and "#ffffff". The value for invert is boolean.
Examples:
cvi_curl.add(document.getElementById("myimg"), { shadow: 75, color: 0 }); cvi_curl.modify(document.getElementById("myimg"), { size: 50 });

Modify image curl using Javascript
cvi_curl.modify(image, options);
If the image has already a curl but the specified size or shadow or color or invert has changed, the curl will be changed accordingly.

Remove curl from an image using Javascript
cvi_curl.remove(image);

Set defaults using Javascript
cvi_curl.defaultSize = size;
cvi_curl.defaultShadow = shadow;
cvi_curl.defaultColor = color;
cvi_curl.defaultInvert = boolean;
Changes the default size and shadow and color and invert. The default value for size is 33 and for shadow 66. The default value for color is 0. The default value for invert is false.

Why use Javascript Image Curl?

In older browsers, the script degrades and your visitors won't notice a thing.

Download

Please read the License before you download curl.js 1.2

F.A.Q.

Please read the Frequently Asked Questions before you contact the author.

History

Version 1.2

Version 1.0

Contact

Please leave any comments at this contact formular.

License

curl.js and cvi_curl_lib.js are distributed under the Netzgestade Non-commercial Software License Agreement.
License permits free of charge use on non-commercial and private web sites only under special conditions (as described in the license). This license equals neither "open source" nor "public domain". There are also Commercial Software Licenses available.

YOU AGREE TO ALL CONDITIONS OF THIS LICENCE AGREEMENT CONCERNING THE USE OF THE SOFTWARE BY ACCEPTING THIS LICENCE.
IF YOU DO NOT AGREE TO ALL CONDITIONS OF THIS AGREEMENT, YOU SHALL NOT INSTALL THE SOFTWARE, OR USE IT IN OTHER WAYS.

curl.netzgesta.de © 2008 by Christian Effenberger feed   delicious   digg   reddit   magnoliacom   newsvine   furl   google   yahoo   blinklist   mister-wong