Home New English–Irish Dictionary » NEID »
Search for a word in Irish or English.

Plugins and widgets » An Foclóirí

An Foclóirí

If you have a website, you are welcome to include in it a plugin we call An Foclóirí. What An Foclóirí does is turn every word on your webpage into a clickable link which leads to a search for that word on teanglann.ie. The links are opened in a small window beside the text so your users do not have to interrupt their reading.

Instructions

First of all, make sure jQuery is embedded in the page. Then include these two lines of code anywhere in the head section (between <head> and </head>):

<script type="text/javascript" src="https://www.teanglann.ie/cab/cab.js"></script>
<script type="text/javascript">jQuery(document).ready(function(){ cab.clickify(); });</script>

In the second one of these lines you see a call to the function cab.clickify(). This is the function which turns every word on the page into a clickable link. If you would like to limit this to a specific section of the page, for example to the main text of the page while leaving out the rest, you can pass that section as an argument like this:

cab.clickify(document.getElementById("articleContent"));

Or, if you prefer to use jQuery, like this:

cab.clickify($("#articleContent"));
About this website | How to use this website | Feedback | Accessibility | Plugins and widgets | Website App | Grammar Wizard | News