Add moving stars (or anything else) on any div
- All you really need is the js file sparkly.js
- Demo
- Or you can see how it works in the src folder
Basic command is `new mySparkle( ).init( elem_selector , number_of_stars , options );`, with `options` being JSON-parsed CSS properties.
In your html file, just add
```
<script>
new mySparkle( ).init( ".mySparkleDiv" , 300 );
</script>
```
Or even
```
<script>
var sparks = new mySparkle( );
sparks.init( ".mySparkleDiv" , 150 , {
"width" : "5px",
} ); // creates 150 stars with a 5px width, in the div(s) with the "mySparkleDiv" class
</script>
```
If no element is specified, then it is assumed that the stars have to be added to the `body`.
This requires jQuery to have been loaded first.
You can add `<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>` in the head of your HTML file.