Display a randomly-generated face (the size of #myDivId determines the size of the displayed face):
<div id="myDivId"></div> <script> faces.generate("myDivId"); </script>
Generate and save a random face object without displaying it:
<script> var face = faces.generate(); </script>
Display a saved face object:
<div id="myDivId"></div> <script> faces.display("myDivId", face); </script>
Combining 2. and 3. into one line, generate and save a random face object while displaying it:
<div id="myDivId"></div> <script> var face = faces.generate("myDivId"); </script>
See live demo and download source code.
DEMO | DOWNLOAD
This awesome plugin is developed by dumbmatter. Visit their official github repository for more information and follow for future updates.