简体   繁体   English

我如何显示工具提示而不将任何元素放在intro.js上

[英]how do i show a tooltip without focusing any element on intro.js

i am using intro.js for my product tour. 我在产品介绍中使用了intro.js。 i want to show tooltip without focusing any element like "welcome to the XYZ tour". 我想显示工具提示时不关注“欢迎使用XYZ游览”之类的任何元素。 i want to use only bootstrap and intro js and i dont want to use any alerts,popups... any solution in terms of intro.js options here i am attaching screenshots.. i am able to attain it if i assing some random selector value, but i want a clean and fair code 我只想使用bootstrap和intro js,并且我不想使用任何警报,弹出窗口……这里介绍intro.js选项的任何解决方案我都附上屏幕截图..如果我能随意选择一些选择器,我就能实现值,但我想要一个干净而公平的代码

coffee js: 咖啡js:

intro.setOptions steps : [ element : "randomXyzselectorThatDoesntExistinPage" intro : "Welcome to the Create New Booking Tour, please follow the step by step guide to understand the flow clearly intro.setOptions步骤:[元素:“ randomXyzselectorThatDoesntExistinPage”简介:“欢迎来到“创建新预订导览”,请按照分步指南清楚地了解流程

Click the 'Next' button to get started on the tour 点击“下一步”按钮开始游览

" position : "bottom" , element : ".userContainer" intro : "FIRST, lets Search if the Guest already exists in our records “ position:” bottom“,元素:” .userContainer“简介:” FIRST,用于搜索Guest是否已存在于我们的记录中

Click the NEXT button to get started on the tour 单击“下一步”按钮开始游览

" position : "bottom" , element : ".availabilityContainer" intro : "Now, lets Check the availability of OYOs for the dates our Guest requires stay and choose one of the availble OYOs to proceed to book" position : "bottom" , element : ".overlayIntrojs" intro : "After selecting an OYO among the available OYOs for those dates, lets choose number of rooms, type of rooms, extra beds, extra persons,discount and other basic information about the booking “位置:”底部“,元素:” .availabilityContainer“简介:”现在,让我们检查来宾需要停留的日期的OYO的可用性,并选择一个可用的OYO进行预订。“位置:”底部“,元素:“ .overlayIntrojs”简介:“在这些日期的可用OYO中选择了OYO之后,让我们选择房间数量,房间类型,加床,额外人员,折扣和其他有关预订的基本信息

" position : "top" , element : ".introJsSel4" intro : "The Payment Details section!, proceed to confirm the booking by entering payment details like mode of payment, amount paid, payment reference number etc" position : "top" ] intro.setOption "doneLabel", "Finish" intro.start().oncomplete -> window.location.href = "/admin/bookings/36" return “位置:” top“,元素:” .introJsSel4“简介:”付款细节部分!,通过输入付款细节(如付款方式,已付款金额,付款参考号码等)来确认预订”位置:“ top”] intro.setOption“ doneLabel”,“完成” intro.start()。oncomplete-> window.location.href =“ / admin / bookings / 36”返回

SCREENSHOT : 屏幕截图:

[IMG] http://i59.tinypic.com/2zges2b.jpg[/IMG] [IMG] http://i59.tinypic.com/2zges2b.jpg[/IMG]

i want the first tooltip to be dispalyed as some WELCOME MESSAGE than direct tour slide... i want what i show in the above image,without having to give some random selector in steps but in a clear introjs supported way 我希望将第一个工具提示显示为一些欢迎消息,而不是直接浏览幻灯片...我希望我在上图中显示的内容,而不必分步提供一些随机选择器,但以明显的introjs支持的方式

You need to use programmatic definition of steps like following: 您需要使用程序定义的步骤,如下所示:

    var intro = introJs();
      intro.setOptions({
        steps: [
          { 
            intro: "Hello world!"
          },
          { 
            intro: "You <b>don't need</b> to define element to focus, this is a floating tooltip."
          }
        ]
      });

      intro.start();

Here is an example: https://github.com/usablica/intro.js/blob/master/example/withoutElement/index.html 这是一个示例: https : //github.com/usablica/intro.js/blob/master/example/withoutElement/index.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM