vanilla-ready

1.0.1 • Public • Published

vanilla-ready

Vanilla JS equivalent of jQuery .ready(): Execute a callback function when the DOM is fully loaded.

Based on Vanilla JavaScript Document Ready (Cross-Browser) by Raymon Schouwenaar

Usage

<head>
...
<script src="vanilla-ready.min.js"></script>
<script>
  document.ready(function () {
    // Place your code here
  });
</script> 
...
</head>

Browser support

  • Chrome (latest 2)
  • Edge (latest 2)
  • Firefox (latest 2)
  • Internet Explorer 8+
  • Opera (latest 2)
  • Safari (latest 2)
  • PhantomJS 2

License

The code is available under the MIT license.

[c]2016 @dmarchena

/vanilla-ready/

    Package Sidebar

    Install

    npm i vanilla-ready

    Weekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    7.99 kB

    Total Files

    8

    Last publish

    Collaborators

    • dmarchena