首页 > 编程语言 >javascript: The Best Guided Tour Plugin

javascript: The Best Guided Tour Plugin

时间:2023-09-22 10:44:42浏览次数:43  
标签:shepherd github text Guided javascript Tour tour https

Best Tour Plugins To Guide Visitors Through Your App
https://yonkov.github.io/post/display-shepherd-only-once/
https://www.jqueryscript.net/blog/best-guided-tour.html
https://whatfix.com/blog/react-onboarding-tour/
https://github.com/shipshapecode/shepherd
https://github.com/wytxer/shepherd-vue
https://shepherdjs.dev/docs/index.html
https://shepherdjs.dev/
https://kamranahmed.info/driver.js/
https://github.com/kamranahmedse/driver.js

 

// author: 
//from https://yonkov.github.io/post/display-shepherd-only-once/

const tour = new Shepherd.Tour({
    defaultStepOptions: {
        scrollTo: true,
        cancelIcon: {
            enabled: true,
        },
        useModalOverlay: true,
    }
});

//Construct the steps
const steps = [{
        title: 'My Awesome Tour Guide : Step One',
        text: 'This step is attached to the bottom of the <code>header</code> element.',
        buttons: [{
            text: 'Next',
            action: tour.next
        }],
    },

    {
        title: 'My Awesome Tour Guide : Step Two',
        text: 'This step is attached to the bottom of the <code>.entry-content</code> element. If no such element is found, the step appears in the center of the screen.',
        buttons: [{
                text: 'Back',
                action: tour.back
            },
            {
                text: 'Finish',
                classes: 'shepherd-button-close',
                action() {
                    // Dismiss the tour when the finish button is clicked
                    dismissTour();
                    return this.hide();
                }
            }
        ]
    },

]

tour.addSteps(steps);

function dismissTour() {
    if (!localStorage.getItem('shepherd-tour')) {
        localStorage.setItem('shepherd-tour', 'yes');
    }
}

// Dismiss the tour when the cancel icon is clicked. Do not show the tour on next page reload
tour.on('cancel', dismissTour);

// Initiate the tour
if (!localStorage.getItem('shepherd-tour')) {
    tour.start();
}

  

标签:shepherd,github,text,Guided,javascript,Tour,tour,https
From: https://www.cnblogs.com/geovindu/p/17721759.html

相关文章

  • Odoo 通过Javascript调用模型中自定义方法
    实践环境Odoo14.0-20221212(CommunityEdition)代码实现在js脚本函数中调用模型中自定义方法:this._rpc({model:'demo.wizard',//模型名称,即模型类定义中_name的值method:'action_select_records_via_checkbox',//模型中自定义名称args:['arg_value......
  • odoo中用javascript调用model中定义好的方法,及要注意的坑
    odoo中如果前端界面要调用后台model中写好的方法,很简单。使用do_action即可,比如要调用改res.users的默认语言后执行的方法odoo.define('switch_language.SwitchLanguageMenu',function(require){"usestrict";varModel=require('web.Model');varsessi......
  • 无涯教程-JavaScript - F.INV函数
    描述F.INV函数返回F概率分布的倒数。如果p=F.DIST(x...),则F.INV(p...)=x。F分布可用于比较两个数据集变异程度的F检验。语法F.INV(probability,deg_freedom1,deg_freedom2)争论Argument描述Required/OptionalProbabilityAprobabilityassociatedwiththeF......
  • 无涯教程-JavaScript - FISHER函数
    描述FISHER函数返回x处的Fisher变换。这种转换产生的功能通常呈正态分布而不是倾斜。使用此功能对相关系数执行假设检验。语法FISHER(x)争论Argument描述Required/OptionalXAnumericvalueforwhichyouwantthetransformation.RequiredNotesFisher变换的等......
  • JavaScript Library – Svelte
    前言上一回我介绍了 Alpine.js。作为我开发企业网站draft版本的renderengine。用了一阵子后,我觉得它真的非常不好用。所以打算换一个。前端有好几个framework/library/compiler都可以用来做MVVMrenderengine。比如Angular、React、Vue、LIt、Solid、Qwik、Svelt......
  • JavaScript实现数组对象去重
    有多种实现方式:一、使用 Set 对象:1Array.from(new Set(array))该方法会先创建一个 Set 对象,然后再使用 Array.from 方法将 Set 对象转换为数组,因为 Set 对象不允许有重复的元素,所以这样可以实现去重的效果。但是,如果数组中的元素是对象,Set 对......
  • Javascript闭包(Closure)
    闭包(closure)是Javascript语言的一个难点,也是它的特色,很多高级应用都要依靠闭包实现。下面就是我的学习笔记,对于Javascript初学者应该是很有用的。一、变量的作用域要理解闭包,首先必须理解Javascript特殊的变量作用域。变量的作用域无非就是两种:全局变量和局部变量。Javascript语言......
  • 无涯教程-JavaScript - COUNTIFS函数
    描述COUNTIFS函数将多个条件应用于跨多个范围的单元格,并计算满足所有条件的次数。语法COUNTIFS(criteria_range1,criteria1,[criteria_range2,criteria2]…)争论Argument描述Required/Optionalcriteria_range1Thefirstrangeinwhichtoevaluatetheassociat......
  • Javascript中window.setInterval和window.setTimeout的区别
    在使用JScript的时候,我们有时需要间隔的执行一个方法,比如用来产生网页UI动画特效啥的。这是我们常常会使用方法setInterval或setTimeout,但是由于这两个方法是由脚本宿主模拟出来的Timer线程,在通过其调用我们的方法是不能为其传递参数。我们常用的使用场景是:代码如下:window.setTi......
  • 无涯教程-JavaScript - COUNTIF函数
    描述COUNTIF函数计算符合条件的单元格数。语法COUNTIF(range,criteria)争论Argument描述Required/Optionalrange您要计数的单元格组。范围可以包含数字,数组,命名范围或包含数字的引用。空白和文本值将被忽略。RequiredcriteriaAnumber,expression,cellr......