zachdrago
7/31/2019 - 5:51 PM

WIdget JS

$(document).on('widget:ready', function (e, instance) {
    instance
        .on('init', function (e, instance) {
            //console.log(e.type, instance);
        })
        .on('load', function (e, listData) {
            //console.log(e.type, listData);
        })
        .on('beforeRender', function (e, $appendRoot, listData) {
            //console.log(e.type, $appendRoot, listData);
        })
        .on('beforeIterate', function (e, tileData, tileId) {
            //console.log(e.type, tileData, tileId);
        })
        .on('iterate', function (e, tileData, tileHTML) {
            //console.log(e.type, tileData, tileHTML);
        })
        .on('beforeAppend', function (e, $tile, tileData, $appendRoot) {
            //console.log(e.type, $tile, tileData, $appendRoot);
            
            // adjust .tile-content as needed
            $tile.find('.tile-content').append('<div class="new-div"></div>');

        })
        .on('append', function (e, $tile, tileData, $appendRoot) {
            //console.log(e.type, $tile, tileData, $appendRoot);
        })
        .on('render', function (e, $appendRoot, listData) {
            //console.log(e.type, $appendRoot, listData);
        })
        .on('message', function (e, addedData, removeIDList) {
            //console.log(e.type, addedData, removeIDList);
        });
});