10 Commits

Author SHA1 Message Date
Alex Fox
7e019fd335 Updated readme to point to lax.js urls 2020-05-11 11:24:54 +01:00
Alex Fox
7fc92ed6c9 Added lax 2.0 link 2020-05-07 18:00:43 +01:00
Alex Fox
38eddc7ab8 Merge pull request #65 from tarunspartan/add-close-script-tag-in-readme
added closing script  tag in readme file
2019-12-20 06:59:44 +00:00
Alex Fox
6d8b4ca9b3 Merge pull request #67 from web-crab/master
Fix lax.removeElement
2019-12-20 06:59:21 +00:00
Andrey Klimash
938b1be1b8 Fix lax.removeElement 2019-11-11 11:32:02 +03:00
Tarun M
69edd64243 added closing script tag in readme file 2019-11-02 20:56:23 +05:30
Alex Fox
1e1067f632 Merge branch 'master' of https://github.com/alexfoxy/laxxx 2019-10-15 15:52:13 +01:00
Alex Fox
19df0b70c1 bumped version 2019-10-15 15:52:01 +01:00
Alex Fox
08bdf99fdd Merge branch 'dev' 2019-10-15 15:51:08 +01:00
Alex Fox
2ab2c5392c Added to .babelrc to .npmignore 2019-10-15 15:51:02 +01:00
5 changed files with 14 additions and 6 deletions

1
.npmignore Normal file
View File

@@ -0,0 +1 @@
.babelrc

View File

@@ -2,14 +2,21 @@
Simple & light weight (<3kb gzipped) vanilla javascript plugin to create *smooth* & beautiful animations when you scrolllll! Harness the power of the most intuitive interaction and make your websites come alive!
[>>> DEMO <<<](https://alexfox.dev/laxxx/)
[>>> DEMO <<<](https://alexfox.dev/lax.js/)
![](https://i.imgur.com/Jbkna80.gif)
[>>> MARIO DEMO <<<](https://alexfox.dev/laxxx/sprite.html)
[>>> MARIO DEMO <<<](https://alexfox.dev/lax.js/sprite.html)
![](https://i.imgur.com/GGQFucZ.gif)
---
## lax 2.0
For those daring enough ;) there is an alpha version of lax.js 2.0 available. Have a play: https://github.com/alexfoxy/lax.js/tree/version-2
---
## Getting Started
### NPM Setup
@@ -27,7 +34,7 @@ import lax from 'lax.js'
```html
<script src="lib/lax.min.js" >
<!-- or via CDN -->
<script src="https://cdn.jsdelivr.net/npm/lax.js" >
<script src="https://cdn.jsdelivr.net/npm/lax.js" ></script>
```
2) Initialize the plugin
@@ -225,7 +232,7 @@ Other
## Sprite Sheet Animations
You can create animations using sprite sheets. See a demo [here](https://alexfox.dev/laxxx/sprite.html).
You can create animations using sprite sheets. See a demo [here](https://alexfox.dev/lax.js/sprite.html).
The `data-lax-sprite-data` is required and formated like so `[frameWidth, frameHeight, frameCount, columnCount, scrollStep]`. You can either set the image using CSS or the `data-lax-sprite-image` attribute. e.g.

Binary file not shown.

View File

@@ -1,6 +1,6 @@
{
"name": "lax.js",
"version": "1.2.4",
"version": "1.2.5",
"scripts": {
"build": "babel src -d lib; uglifyjs lib/lax.js -o lib/lax.min.js -c -m; gzip < lib/lax.min.js > lib/lax.min.js.gz;"
},

View File

@@ -166,7 +166,7 @@
}
lax.removeElement = (el) => {
const i = lax.elements.findIndex(o => o.el = el)
const i = lax.elements.findIndex(o => o.el === el)
if(i > -1) {
lax.elements.splice(i, 1)
}