TagCloud.ItemClick

Syntax

ItemClick: function(sender, args);

Parameters

sender. Event source.

args. Event information.

Description

The ItemClick event occurs after clicking the mouse button on the cloud active tag.

Example

To execute the example, the page must contain the TagCloud component named tagCloud (see. Example of Creating the TagCloud Component). The example must be placed in the <script> tag. Add a handler of the cloud tag clicking event:

// Add a cloud tag clicking event
tagCloud.ItemClick.add(function(sender, args) {
    console.log("Cloud tag is clicked");
});
tagCloud.getDomNode().onclick = function (sender, args) {
    if (tagCloud._HoverItem != undefined) {
        tagCloud.ItemClick.fire(tagCloud._HoverItem, {});
    }
});

After clicking the item, the console displays the tag clicking message:

Cloud tag is clicked

See also:

TagCloud