1.0.7 • Published 4 years ago

watchmydom v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

watchmydom

A Javascript library to watch the DOM changes in a single callback

Demo

Click here to see the detailed demo.

Download

Minified script file has been added in the build folder.

Installation/Usage

  1. Add the library script into your page
<script src="watchmydom.min.js"></script>
  1. Initialize watchMyDom object in your custom script. You can use a class name, id or a tagName.
var watchIt = new watchMyDom("#div-id");
  1. Use watch() method to start watching.
watchIt.watch(function (result, info) {
	//Callback
});
  1. Use stop() method to stop watching.
watchIt.stop();

npm Installation

  1. Install the package

    npm i watchmydom
  2. Use the module as shown below.

    var watchmydom = require("watchmydom");
    var domResults = new watchmydom(".dom-results");

Methods

MethodsUsage
watch()Use this to start watching
stop()Use this to stop watching

Callbacks

You can see the DOM updates/changes in the watch() calllback function.

ParametersUsage
resultSorted observations
infoComplete observations

License

MIT

Code

Saif

1.0.7

4 years ago

1.0.6

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago