diff --git a/dist/index.html b/dist/index.html index a9efad1..148ca0b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -36,7 +36,7 @@
-Buttons to add/remove contrast and increase/decrease font size.
@@ -113,15 +113,34 @@Note: To get font-size to work, it's necessary to use "em" or "rem" units.
-Initialize the plugin
+Initialize the Plugin after the dom ready
+ +If you don't use jQuery (support IE9+)
- accessibilityButtons();
+ function ready(fn) {
+ if (document.readyState !== 'loading') {
+ fn();
+ } else {
+ document.addEventListener('DOMContentLoaded', fn);
+ }
+}
+
+ready(function() {
+ accessibilityButtons();
+});
+ If you use jQuery
+ +$(document).ready(function() {
+ accessibilityButtons();
+})
+
+ Note: To get font-size to work, it's necessary to use "em" or "rem" units.
+To set up buttons names and aria-labels, call the plugin with additional options.
@@ -160,7 +179,7 @@