Skip to content

mrflix/paperfold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Paperfold JS

Fold website elements in 3D. Demo: felixniklas.com/paperfold. It's based on an experiment from 2011.

##Usage

Include jQuery and paperfold.js in your site.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="/path/to/paperfold.js"></script>

Call paperfold on the container you want to fold and bind the fold interaction to a button or any other interaction.

$(function() {
	var paperfold = $('.hidden').paperfold();

	$('.paperfold-toggle').click(paperfold.toggle);
});

====

MIT License. © Felix Niklas (http://twitter.com/mrflix).