JSFiddle - React, Tailwind, and code Playground

by nickadeemus2002

JavaScript

var guidely = (function() {
    return {

        _guides: [],

        _defaults: {
            showOnStart: true,
            welcome: true,
            welcomeTitle: 'Welcome to the guided tour!',
            welcomeText: 'Click to start a brief tour of our site. Here we\'ll point out important features and tips to make your experience easier. ',
            overlay: true,
            startTrigger: true,
            escClose: true,
            keyNav: true,
            debug: false
        },
        //end defaults
        _options: {},

        init: function(config) {
            var that, options;
            that = this;
            that._options = $.extend(that._defaults, config);
            if (that._guides.length < 1) {
                that._log('No guides available.');
                return false;
            }
            that._append();
            that._createTopAnchor();
            that.close();
            if (that._options.startTrigger) {
                that._createStartTrigger();
            }
            if (that._options.showOnStart) {
                if (that._options.welcome) {
                    that.welcome();
                } else {
                    that.start();
                }
            }
        },
        //end init
        start: function() {
            var that = this;
            that.close();
            that._scrollToTop();
            that.showNumbers();
            that.show(1);
            that.showOverlay();
            that._log(that._guides);
            that._reposition();
            $(document).bind('keyup.guidely', function(e) {
                if (that._options.escClose) {
                    if (e.keyCode == 27) {
                        that.close();
                    }
                }
                if (that._options.keyNav) {
                    if (e.keyCode == 37) {
                        that.prev();
                    }
                    if (e.keyCode == 39) {
                       ...