http___www.teanglann.ie_ga__focloiri_1.xml
1.1 2.1 2.2 2.3 3.1 3.2 4.1 7.1 8.1 9.1 9.2 9.3 10.1 11.1 12.1
Plugins and widgets » 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. First of all, make sure jQuery is embedded in the page. Then include these two lines of code anywhere in the head section (between and jQuery(document).ready(function(){ cab.clickify(); }); 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"));
1.1 2.1 2.2 2.3 3.1 3.2 4.1 7.1 8.1 9.1 9.2 9.3 10.1 11.1 12.1
Breiseáin agus giuirléidí » An Foclóirí Má tá suíomh idirlín de do chuid féin agat, tá fáilte romhat an breiseán seo, ar a nglaonn muid An Foclóirí, a chur air. Cuireann An Foclóirí ar chumas do chuid léitheoirí cliceáil ar fhocal ar bith sa téacs chun é a chuardach ar teanglann.ie. Osclaítear an cuardach i bhfuinneog bheag in aice an téacs sa treo nach gcuirfí isteach ar an léitheoreacht. Ar dtús, déan cinnte go bhfuil jQuery leabaithe sa leathanach. Ansin, cuir na línte seo isteach áit ar bith i gceanntásc an leathanaigh (idir agus jQuery(document).ready(function(){ cab.clickify(); }); Sa dara ceann de na línte seo, glaoitear ar an fheidhm cab.clickify(). Is í seo an fheidhm a iompaíonn gach focal ar an leathanach ina nasc inchliceáilte. Más maith leat é seo a theorannú do rannóg faoi leith ar an leathanach, mar shampla do phríomhthéacs an leathanaigh agus codanna eile den leathanach a fhágáil amach, is féidir leat an rannóg sin a chur isteach mar pharaiméadar mar seo: cab.clickify(document.getElementById("articleContent")); Nó, más fearr leat jQuery, mar seo: cab.clickify($("#articleContent"));