From 4fd8b854b00c0921ce5bfbb93c139fa25ff587a0 Mon Sep 17 00:00:00 2001 From: "w.stoettinger" Date: Mon, 21 Dec 2015 15:12:49 +0100 Subject: [PATCH] readme update and version bump --- README.md | 33 +++++++++++++++++++++++++++++++++ bower.json | 3 ++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 680f6f0..3c217f2 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,39 @@ Also, keep in mind that once initialized, the parallax plugin presumes a fixed p jQuery(window).trigger('resize').trigger('scroll'); ``` +### Using inner HTML for complex content + +You can use the following syntax to enable complex content for the parallax: + +```html +
+
+ Some Text +

Some other Content

+
+
+``` +Please note, that the div with class "parallax-slider" is essential here. + +You then need to initialize it through JS and provide the naturalWidth and naturalHeight options in order to be rendered correctly. + +``` +$('.parallax-window').parallax({ + naturalWidth: 600, + naturalHeight: 400 + }); +``` + +This also makes it possible to use responsive images in the slider: + +```html +
+
+ +
+
+``` + ## Options Options can be passed in via data attributes of JavaScript. For data attributes, append the option name to `data-`, as in `data-image-src=""`. diff --git a/bower.json b/bower.json index bd8b213..7db6780 100644 --- a/bower.json +++ b/bower.json @@ -1,10 +1,11 @@ { "name": "parallax.js", - "version": "1.3.2", + "version": "1.4.0", "homepage": "http://pixelcog.com/parallax.js/", "description": "Simple parallax scrolling effect inspired by spotify.com implemented as a jQuery plugin", "authors": [ "Mike Greiling (http://pixelcog.com)" + "Wolfgang Stöttinger (http://www.wolfography.at)" ], "main": "parallax.min.js", "license": "MIT",