From our sponsor: Wix’s robust, secure platform lets you develop faster and deliver smarter.
PFold is a very experimental jQuery plugin that makes it possible to open elements in a paper-like unfolding effect. An element can be unfolded in 3D in order to reveal some other content. The idea is to have several levels of folding, where each step of opening will double the element size, hence imitating a folded paper being opened.
A couple of options are available, such as the unfolding direction for each step and the number of folding steps.
For browsers that don’t support CSS 3D transforms or transitions, there will be a simple fallback, i.e. the larger content appears.
For using the plugin, the following structure is expected:
<div id="uc-container" class="uc-container"> <div class="uc-initial-content"> <!-- initial content --> </div> <div class="uc-final-content"> <!-- final content --> </div> </div>
The final content’s size will depend on the initial content’s size (set in the CSS), the folding directions and the number of folding steps. For example, having an initial element of 200px width and height, a folding direction of bottom and left and two folding steps will create a final area of 400px in width and height.
The plugin can be called like this:
$( '#uc-container' ).pfold();
Options
The following options are available:
// the options $.PFold.defaults = { // perspective value perspective : 1200, // each folding step's speed speed : 450, // each folding step's easing easing : 'linear', // delay between each (un)folding step (ms) folddelay : 0, // number of times the element will fold folds : 2, // the direction of each unfolding step folddirection : ['right','top'], // use overlays to simulate a shadow for each folding step overlays : true, // the main container moves (translation) in order to keep its initial position centered : false, // allows us to specify a different speed for the container's translation // values range : [0 - 1] // if 0 the container jumps immediately to the final position (translation). // this is only valid if centered is true containerSpeedFactor : 1, // easing for the container transition // this is only valid if centered is true containerEasing : 'linear', // callbacks onEndFolding : function() { return false; }, onEndUnfolding : function() { return false; } };
Check out the three demos with different configurations:
awesome thing i’ve ever seen on the web . great 😀 , thanks .
Great effect, awesome work. 🙂
Very nice work Pedro! 🙂
Simply cool…
Amazing !!!!!
Extra!
Liked the great effect,
and the funny “monkeys” demo text!
In demo 1, small typo:
“wanted” inst. of ” wated”.
thanks!
Nice work! I like the easy setup options.
This is truly great… ‘sick’ if you will. Great work, love it!
Nice one. How close are we to being able to make this only with css?
I did something similar: http://codepen.io/ferra-andre/full/Kxhiv
This is great..! Nice effect. Thanks a ton for sharing.
Very cool project, is it possible to have some kind of lightbox type of navigation between photos on a page? Thanks a ton for sharing it!
Awesome as usual!
Thanks a ton for sharing. great work! love it! 🙂
Awesome great work 🙂
Very Gooooooooooooooooooooooooood!
Thank you 😀
Wonderful work… thanks u for sharing…
really great effect !!
thanks !!
Great demo.
I was trying it out but I cannot seem to put a working link in the text inside.
Anyone?
– Thomas
This is amazing 🙂