click

The click event is fired when the user clicks on an item in the tag cloud.

The data source item corresponding to this tag can be accessed from the event.item property.

<div id="tags" />

<script type="text/javascript">
    jQuery(function ($) {
        $("#tags").shieldTagCloud({
            title: "Shield UI Demos",
            dataSource: {
                remote: {
                    read: "/api/demo-stats"
                },
                schema: {
                    data: "components"
                }
            },
            textTemplate: "{name}",
            frequencyTemplate: "{demos}",
            hrefTemplate: "{url}",
            events: {
                click: function(event) {
                    console.log(event.item);

                    // stop the event propagation to cancel 
                    // the redirection to the URL of the item
                    event.preventDefault();
                }
            }
        });
    });
</script>