Skip to content

remipou/horunge.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Horunge.js

Easily prevent typographic orphans.

Horunge is the Swedish equivalent for orphans when we’re talking typography. Supports CommonJS, AMD or browser globals.

Install

Bower

bower install jquery-horunge

Manual install

Download the production version (519 B minified, 349 B gzip) or the development version.

Usage

In your web page:

<h1>This is a sample heading</h1>

<script src="jquery.js"></script>
<script src="bower_components/jquery-horunge/dist/jquery.horunge.min.js"></script>
<script>
$(function() {
  $('h1').horunge();
});
</script>

Options

$.horunge({
  words: 2 // number of words to always keep at new line. default "2"
});

Release history

  • 0.0.5 - Feb 11, 2015
    • Using splice (Thanks @rrostt)
  • 0.0.4 - Feb 10, 2015
    • Using slice instead of while loop (Thanks @rrostt)
  • 0.0.3 - Feb 10, 2015
    • Support CommonJS, AMD or browser globals
  • 0.0.2 - Feb 10, 2015
    • Wrote tests
    • Fixed an issue where Horunge is applied to a paragraph with only 2 words, it removes the words from the page
  • 0.0.1 - Mar 19, 2014
    • First release

About

Prevent typographic orphans

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%