Js Widget

Enable your website to show news from our Global Fast-Check Database

Prerequisites

To use our widget you will need to have the API Key, if you don't have one please request to our team at https://turnbackhoax.id/tentang-kami/kontak-kami/

Installation and Setup

Put these line of code inside your header tag

header.html
<link rel="stylesheet" href="http://cekfakta.com/public/widget/yd-widget-1.1.0.css" />
<script src="http://cekfakta.com/public/widget/yd-widget-1.1.0.jquery.min.js"></script>
<script>
    (function($) {
        $(document).ready( function() {
    
            $('.js-widget').yudistira({
                key  : [YOUR API KEY]
                // more options here
            });
        });
    }(jQuery));
</script>

The widget is based on jQuery javascript library, so you will need to include jQuery as well.

Options Parameter

Type

Value

Example

Please check all files on the sample code below

$('.js-widget').yudistira({
    ... ,
    type : 'list' // you can use value 'list' or 'single'
    ...
});

Method

Value

Example

Please check all files on the sample code below

$('.js-widget').yudistira({
    ... ,
    method : 'latest',
    value: '[DATA_COUNT_NUMBER]' // news count which will be shown
    ...
});

Prop Parameter

When you use method 'property' at your plugin there will be selection of 'prop' value.

Value Parameter

This parameter function differently on the three method stated above

Last updated