My Account | Buy CometChat

documentation

ping()

ping() allows you to find out if CometChat has loaded.

The API

The ping() function will return true if CometChat has been loaded.

jqcc.cometchat.ping();

Sample Code

To test functionality, wrap the ping() function in a try catch statement.

document.onload = function() {
    testload();
}

function testload(data) {
    var loaded = 0;
    try {
        loaded = jqcc.cometchat.ping();
    } catch (err) {

    }

    if (loaded) {
        alert('CometChat has loaded');
    }
}