Lorem JS

Lorem JS is a easy to use Javascript library which helps include Lorem Ipsum text. All of this done just by using just the Class Names.

Usage

Always Use the class name lo or lorem wherever you need lorem.js to output a paragraph for you. You can use any one of them. After the initial class you have to add amongst the choices:

  1. xs - Two words
  2. sm - Twenty words
  3. md - Seventy words
  4. lg - Two Hundred words
  5. xl - Three Fifty words
  6. someNumber - Some number of words

Tags

These classes work on the following html tags only:

  1. <p> - Paragraph tags
  2. <span> - Span tags
  3. <h1> through <h6> - Heading tags
  4. <div> - Can be used on a div tag for creating multi-paragraphed lorem ipsum

If the class is being used on any other tags, it will result in a console.error message displayed in your developer console and lorem.js will not work on that tag.


Examples

1. To get a small paragraph do as follows. This will output a single paragaph with 20 words

<p class="lorem sm"></p>

or

<p class="lo sm"></p>

2. To get a paragraph with custom number of words do as follows. The following will output '123' worded paragraph.

<p class="lorem 123"></p>

3. To get Multiple paragraphs with multiple words do as follows. The following will output 10 paragraphs with 40 words each.

<div class="lorem 9 39"></div>

Syntax:

<div class="lorem numParagraphs - 1 numwords/paragraph - 1"></div>