Skip to content

StephenBrownski/jQuery-Define

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery-Define

A simple plugin for creating automatic definition pop-ups

Install

Two files are required:

jquery.define.js
jquery.define.css

Basic Use

$('.define').definitions( {
  term: {
    word: 'contiguous',
    definition: 'touching; in contact'
  }
} );

Now the script will search for the first instance of 'contiguous' in any divs with a class of 'define', and add a definition pop-up:

Multiple Definitions

var $words = [
  {
    word: "contiguous",
    definition: "touching; in contact."
  }, {
    word: "slake",
    definition: "to allay (thirst, desire, wrath, etc.) by satisfying."
  }, {
    word: "mot",
    definition: "a pithy or witty remark; bon mot."
  }
]


$('.define').definitions( {
  term : $words,
} );

About

A simple plugin for creating automatic definition pop-ups

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published