loren-ipsum for images
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
media
README
index.html
lowersrc.js

README

lowersrc: "Loren Ipsum" for images
Dynamically created image placeholders.
v1.0 by Mr Speaker (www.mrspeaker.net)
Info: http://mrspeaker.github.com/lowersrc/
Repo: https://github.com/mrspeaker/lowersrc/

Install: Just include it in your page...
<script src="lowersrc.js" type="text/javascript"></script>

Usage: 
<img class="lowersrc" width="100" height="150" data-text="Main Image" />

Attributes:
    width
    height
    
    data-bg [none, *solid]
    data-bg-col
    
    data-border [none, *solid]
    data-border-col
    
    data-fg [none, *cross, circle]
    data-fg-col (defaults to data-border-col)
    
    data-text "string..."
    data-text-col
    data-text-bg-col (defaults to data-bg-col)

Notes:
    Colours: can be any HTML colour, or "{random}" for random colours.
    Defaults: Add the attribute data-default="true" to one image to copy settings to all images
    Copy settings: copy attributes from another image with data-copy="image-id" 
                   (where the image to copy has id "image-id")

Todo:
    make it work with style set width
    maybe take any img without src as the source?
    wrap text
    test text-measuring in agents