Skip to content

Commit

Permalink
Installation, housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
Elliott Kember committed Jan 18, 2009
1 parent 116d0ae commit 8ce47f0
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions INSTALLATION.TXT
@@ -0,0 +1,48 @@
Okay, so you want a sexy page turn like @elliottkember?

This is your chance.

Copy everything in this repository into the /turn/ folder in your public directory.

Now, in your HTML, insert an object like this:

<img id="target" src="turn/code.png">
Take note, it has an ID. This is useful. The object does not have to be an image, but images look awesome.
For instance, I use a screenshot of my site's HTML code.

Then, in your HTML <head>, put:

<script type="text/javascript" src="turn/turn.js"></script>
<link rel="stylesheet" type="text/css" href="turn/turn.css">

<script type="text/javascript">
$(document).ready(function(){
$( '#target' ).fold({});
});
</script>

And your site should be awesome too.

Now, if you're a clever clogs and look at the code, you'll find this:

// Default awesomeness
var defaults = {
directory: 'turn', // The directory we're in
side: 'left', // change me to "right" if you want rightness
turnImage: 'fold.png', // The triangle-shaped fold image
maxHeight: 400, // The maximum height. Duh.
starting_width: 80, // The height and width
starting_height: 80 // with which to start
};

These are the default values, and you can specify them as you see fit in your HTML.
For instance, if you went like this:

$(document).ready(function(){
$( '#target' ).fold({
side: 'right' // Right! Whoa!
});
});

You'd get the page turning from the top-right... and that'd be awesome.
Binary file added code.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion turn.js
Expand Up @@ -19,7 +19,7 @@

// Change turnImage if we're running the default image, and they've specified 'right'
if (options.side == 'right' && !options.turnImage) {
defaults.turnImage = 'fold3-sw.png';
defaults.turnImage = 'fold-sw.png';
}

// Merge options with the defaults
Expand Down

0 comments on commit 8ce47f0

Please sign in to comment.