Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 743 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 743 Bytes

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