Knowledgebase: Coding / Scripting
How To Create A Peel Away Effect
Posted by Modestas J on 17 June 2012 04:57 PM

Peel away effect lets to display some advertisement or link to website directly in the right upper corner of our blog or website. It creates nice effect when visitor hovers mouse cursor over right upper corner, it opens like paper sheet.

In this article, we will explain how to implement such effect in our WordPress website. Start by downloading required files from here. Once downloaded, extract "peel" directory and open "peel.js" file for editing. Locate the following lines:

jaaspeel.ad_url = escape('http://www.host1plus.com');
jaaspeel.small_path = 'http://94.249.190.85/wordpres/wp-content/themes/twentyelevens/peel/small.swf';
jaaspeel.small_image = escape('http://94.249.190.85/wordpress/wp-content/themes/twentyeleven/peel/small.jpg');

jaaspeel.big_path = 'http://94.249.190.85/wordpress/wp-content/themes/twentyeleven/peel/large.swf';
jaaspeel.big_image = escape('http://94.249.190.85/wordpress/wp-content/themes/twentyeleven/peel/large.jpg');

Replace "jaaspeel.ad_url" with website link which will be shown after initiating effect. The rest URLs needs to be adjusted according to WordPress website installation. Please note, "peel" directory needs to be uploaded in WordPress theme directory.

Then open theme file "header.php" and place the following code right before "</head>" tag.

<script src="<?php bloginfo('template_url'); ?>/peel/peel.js" type="text/javascript"></script>

We are done. Now go to the blog or website and check how this effect is working. It's also possible to make our own images for this effect, just update them in "peel" directory.

The Best Web Hosting

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako Fusion