How to access the JS function in RokcetWeb Android?

After RokcetWeb from codecanyon, I was trying to use Toast, JS Alert, Snack-bar etc. But don’t found any tutorial.

If you are seeing the Rockettes demo app it has some JS option.
JS Alert, Toast, Snack-bar: It’s web functionality if you add the JS Alert and it’s showing on your Android Device then it’s also working on RocketWeb.

Here is the JS code that I used on my demo sample webpage:

// Toast
function showToast(text) {
    var x = document.getElementById('toast');
    x.innerHTML = text;
    x.classList.add('show');

    setTimeout(function () {
        x.classList.remove('show');
    }, 3000);

    return false;
}
// show alert
function showAlert(text) {
    window.alert(text);
    return false;
}
// Snackbar
function showSnackbar(text) {
    var x = document.getElementById('snackbar');
    x.innerHTML = text;
    x.classList.add('show');

    setTimeout(function () {
        x.classList.remove('show');
    }, 3000);

    return false;
}

Leave a Reply