glosser

A jQuery plugin for linguistic glossing.


Keywords
jquery, glosser, linguistics, linguistic glossing, lists
License
MIT
Install
bower install glosser

Documentation

Glosser

A jQuery plugin for linguistic glossing.

Installation

You can use Bower to install Glosser, by running the following command.

bower install glosser

Or you can download and unpack the latest release of Glosser.

Include a link to Glosser’s CSS file like so:

<link rel="stylesheet" href="path/to/glosser.css">

Make sure to include the JavaScript file after the jQuery reference.

<script src="path/to/jquery.min.js"></script>
<script src="path/to/glosser.js"></script>

Basic usage

Simply create an HTML element like a span or div and give it a meaningful class name, like .to-gloss.

<div class="to-gloss">
	Dit is een testzin. Het werkt!
	This is a {test sentence} It work.3sg
</div>

Every line will be a glossed line. Every word on each line will be intrepreted as a separate gloss, divided by spaces. To have a gloss consist of multiple words (i.e. contain a space), place the intended gloss between curly brackets {}.

Next, use this simple JavaScript line to select the container and call the Glosser function.

$('.to-gloss').glosser();

And we’re done!