Curl.js 1.4 allows you to add individual curls (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


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.

Classes

Scripting Curls

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).

Set defaults using Javascript
cvi_curl.defaultSize = 33; //INT 0-100 (% curling)
cvi_curl.defaultShadow = 66; //INT 0-100 (% opacity)
cvi_curl.defaultColor = 0; //STR '#000000'-'#ffffff' or 0
cvi_curl.defaultInvert = false; //BOOLEAN
If cvi_filter_lib.js is loaded also...
cvi_curl.defaultFilter = null; //OBJ [{f='grayscale'},{f='emboss', s:1}...]

Add images using Javascript
cvi_curl.add(image, options);
image should be an image element: document.getElementById("myimg")
options can contain one or more values: {size: value, shadow: value, color: value, invert: value, filter: value}
Examples:
cvi_curl.add(document.getElementById("myimg"), { shadow: 75, size: 50 });
<img onLoad="cvi_curl.add(this, { shadow: 75, size: 50 });" ...>

Modify images using Javascript
cvi_curl.modify(image, options);
If the image has already an effect but a option value has changed, the effect will be changed accordingly.
Example:
cvi_curl.modify(document.getElementById("myimg"), { size: 100 });

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

Support libs

If you are using the more flexible "cvi_curl_lib.js" instead of "curl.js", you'll get access to additional features by the following support libraries (part of distribution):

Why use Javascript Image Curls?

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

History

Version 1.4 Version 1.3 Version 1.2 Version 1.0

License

curl.js, and cvi_curl_lib.js are distributed under this LICENSE. 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.

Images used are copyrighted and are used for demonstration only.

cvi.netzgesta.de  also visit  CVI-lab, CVI-dev, S5 Reloaded and AJAX-FilmDB