From 3fe53ed112afb8a06f0171c58245f07490f7cef1 Mon Sep 17 00:00:00 2001 From: Viktor Bergehall Date: Thu, 22 Sep 2016 18:10:25 +0200 Subject: [PATCH] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c417db7..0f50625 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Include javascript in html ``` Sass import -``` +```sass @import 'src/scss/lazyframe'; ``` Include css in html @@ -82,18 +82,18 @@ lazyframe(elements, { onLoad: (lf) => console.log(lf) }) ``` -### apikey +### `apikey` If you want to load a thumbnail and title for a Youtube video you'll have to have an apikey. Get it from [here](console.developers.google.com) _If you don't feel like getting a key, just use your own thumbnail and title in data-thumbnail and data-title attribute_ -### debounce +### `debounce` Value (in milliseconds) for when the update function should run after the user has scrolled. [More here](https://css-tricks.com/the-difference-between-throttling-and-debouncing/) -### lazyload +### `lazyload` Set this to true if you want all api calls and local images to be loaded on page load (instead of when the element is in view). -### onLoad +### `onLoad` Callback function for when a element is initialized. ##Element-specific options @@ -108,15 +108,15 @@ Callback function for when a element is initialized. data-initinview="false"> ``` -### data-vendor +### `data-vendor` Attribute for theming lazyframe. Currently supported values are youtube, vimeo and vine. -### data-title +### `data-title` Attribute for custom title. Leave empty to get value from api. -### data-thumbnail +### `data-thumbnail` Attribute for custom thumbnail. Leave empty to get value from api. -### data-src +### `data-src` The source of what you want to lazyload. -### data-initinview +### `data-initinview` Set this to true if you want the resource to execute (for example video to play) when the element is in view. ## License