You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,9 @@ Buttons accept the following attributes:
28
28
-**data-style**: one of the button styles, full list in [demo](http://lab.hakim.se/ladda/)*[required]*
29
29
-**data-color**: green/red/blue/purple/mint
30
30
-**data-size**: xs/s/l/xl, defaults to medium
31
-
-**data-spinner-size**: 40, pixel dimensions of spinner, defaults to dynamic size based on the button height
32
-
-**data-spinner-color**: A hex code or any [named CSS color](http://css-tricks.com/snippets/css/named-colors-and-hex-equivalents/).
33
-
-**data-spinner-lines**: 12, the number of lines the for the spinner, defaults to 12
31
+
-**data-spinner-size**: pixel dimensions of spinner, defaults to dynamic size based on the button height
32
+
-**data-spinner-color**: a hex code or any [named CSS color](https://css-tricks.com/snippets/css/named-colors-and-hex-equivalents/)
33
+
-**data-spinner-lines**: the number of lines the for the spinner, defaults to 12
34
34
35
35
### JavaScript
36
36
@@ -40,7 +40,7 @@ Start by importing the Ladda module:
40
40
import*asLaddafrom'ladda';
41
41
```
42
42
43
-
If you want JavaScript control over your buttons you can use the following approach:
43
+
The following approach is recommended for JavaScript control over your buttons:
44
44
45
45
```javascript
46
46
// Create a new instance of ladda for the specified button
@@ -65,7 +65,7 @@ l.isLoading();
65
65
l.remove();
66
66
```
67
67
68
-
If you will be using the loading animation for a form that is submitted to the server (always resulting in a page reload) you can use the `bind()` method:
68
+
To show the loading animation for a form that is submitted to the server (always resulting in a page reload) the `bind()` method can be used:
69
69
70
70
```javascript
71
71
// Automatically trigger the loading animation on click
@@ -85,7 +85,12 @@ Ladda.stopAll();
85
85
86
86
## Browser support
87
87
88
-
The project is tested in Chrome, Firefox, and Edge. It Should Work™ in the current stable releases of Chrome, Firefox, Edge, and Safari, as well as IE9 and up.
88
+
Ladda has been tested in Chrome, Firefox, Edge, and Internet Explorer 11.
89
+
It also Should Work™ in Safari and Internet Explorer 10.
90
+
91
+
Note: Ladda 2.x is distributed as an ES6 module, but not all browsers support importing native ES6 modules.
92
+
For full browser compatibility, use a module bundler such as <ahref="https://webpack.js.org/">Webpack</a>
93
+
or <ahref="https://rollupjs.org/">Rollup</a> to create a production-ready code bundle.
0 commit comments