Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 1.03 KB

README.md

File metadata and controls

25 lines (21 loc) · 1.03 KB

Instructions

  1. Clone the repository
  2. Edit the example.html file or use it as a guide

Adding Additional Languages

Pass in a JS Object to languageMatchAndWrap with the new language name and a regex that can detect that language

$("p").languageMatchAndWrap(
{
    language : 'langCode',                       // enter language code (en, he, etc...) see: http://www.w3schools.com/tags/ref_language_codes.asp
    regExMap : {languageName : /[A-Z]/}               //create a regEx to grab word containing language
});

Notes

  1. Elements can contain only text or it can contain both HTML and text. The plugin will traverse the child nodes and their children (and so on) if they exist.
  2. There may be a performance hit depending on how deep the child node list is. This has not been fully performance tested.
  3. This was tested with jQuery 1.7.2 and jQuery 1.9.1

More information: http://www.teeohhem.com