JSFiddle - React, Tailwind, and code Playground

by Nibin George

JavaScript

$(window).ready(function () {
    alert("ready");
    if ($(window).width() >= 768) {
        /*$(".green-tooltip").tooltip({
            placement: 'bottom'
        });*/

    } else if ($(window).width() <= 767) {

        /*$(".green-tooltip").tooltip({
            placement: 'top'

        });*/
    }
});
$(window).resize(function () {
    alert("resized");
    var wi = $(window).width();
    if (wi >= 768) {

        /*$(".green-tooltip").tooltip({
            placement: 'bottom'
        });*/

    } else if (wi <= 767) {

        /*$(".green-tooltip").tooltip({
            placement: 'top'

        });*/
    }
});