1.0.1 • Published 6 years ago

defaultimg v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

Defaultimg library

Simple library for setting default src attribute for imgs.For example,to set 10 same photos, just create 10 img tags, and then use defaultimg to set them src and alt attributes.First, just link the defaultimg.js or defaultimg.min.js to your site. You can done it by downloading from github repo: https://github.com/kamilmichna/defaultimg or from npm by npm install defaultimg --save.Then link it by script tage.

10 empty img tags
<script src='defaultimg.js'></script>
</body>

next, just use library to specify the src and alt.

10 empty img tags
<script src='defaultimg.js'></script>
<script> defaultimg.main('dino.jpeg','dinosaur image') </script>
</body>

defaultimg.main() function gets two arguments.First, a src to image , and second , alt for an image.

1.0.1

6 years ago

1.0.0

6 years ago