Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Lorem.js Dummy Text/Image Generator for jQuery and Native JS
branch: master

This branch is 3 commits ahead, 6 commits behind f:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
LICENSE
README.md
index-nojquery.html
index.html
lorem.js

README.md

Lorem.js Dummy Text/Image Generator jQuery and Native JS

A Lorem Ipsum creator service written on JavaScript.

Implementation

Implementation of Lorem.js is so simple,

You just download and add

<script src="path/to/lorem.js"></script>

into your website/application and run.

If you want to put a lorem text inside a DIV (etc.) tag just write:

<div data-lorem="2p"></div>

Querying

Lorem.js has a simple query language: "how many?, what?"

2p = 2 paragraphs
5s = 5 sentences
6w = 6 words

That's it.

Dummy Images

And Lorem.js uses lorempixum.com for images for now.

Usage:

<img src="" data-lorem="sports/1/Test message" width="223" height="223">
<img src="" data-lorem="gray" width="100" height="124">
<img src="" data-lorem="gray animals" width="100" height="124">

And watch what happens :)

Native JavaScript (without any framework)

If you want to use Lorem generator natively, (without jQuery).

With Native support, you can lorem.js into your framework.

Usage:

var lorem = new Lorem;
lorem.type = Lorem.TEXT;
lorem.query = '2p';
lorem.createLorem(document.getElementById('lorem'));

Feel free to ask questions.

Something went wrong with that request. Please try again.