diff --git a/README.md b/README.md index 4edf567..17b35f9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Include the javascript and css files. ```html - + @@ -25,7 +25,7 @@ After including the files you are ready to create a container that holds two ima Now initialize the plugin on the window load: ``` -$(window).load(function(){ +$(function(){ $("#container1").twentytwenty(); }); ``` @@ -34,7 +34,7 @@ $(window).load(function(){ ```js -$(window).load(function(){ +$(function(){ $(".twentytwenty-container").twentytwenty({ default_offset_pct: 0.7, // How much of the before image is visible when the page loads orientation: 'vertical', // Orientation of the before and after images ('horizontal' or 'vertical') @@ -62,7 +62,7 @@ If you want to avoid a [FOUC](http://en.wikipedia.org/wiki/Flash_of_unstyled_con If you want to use multiple instances of this plugin on a single page you can target the container class: ```js -$(window).load(function(){ +$(function(){ $(".twentytwenty-container").twentytwenty(); }); ``` diff --git a/index.html b/index.html index 0ee4982..a06c7ee 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@

Basic Usage

- +

Vertical Orientation

@@ -58,12 +58,15 @@

Side by side

- - + +