Example Kalooga Implementation


The following text describes how the Kalooga Button Widget can be implemented on your images. To do this you only need to add a script tag to your page and add a CSS class to the images on which you want the button to appear.

Step 1: Include Kalooga script tag

To install Kalooga widgets on a website a small Javascript snippet must be included on every page. This Javascript snippet will load a customized script for the website asynchronously, which does not affect the page load speed. This loaded script analyses the current web page and depending on the added HTML tags and/or classes, it will insert the specified Kalooga widgets.

<!-- Kalooga script code for Animal Farm-->
<script type="text/javascript">
    var d=document,k="kalooga",s="script",n=d.createElement(s),

Step 2: Add class to your image

The next step is to add a class to your images, by which our script recognizes the image, so it can overlay a button onto it.

For example:

<img src=”/images/my_news_image.jpg” class=”article_image”>

will become:

<img src=”/images/my_news_image.jpg” class=”article_image kalooga_8314”>