【问题标题】:LinkedIn hopscotch tutorial - how to change the name of the label?LinkedIn hopscotch 教程 - 如何更改标签的名称?
【发布时间】:2013-08-22 16:18:14
【问题描述】:

我正在为网站设置 LinkedIn 导览。 http://linkedin.github.io/hopscotch/ 它工作正常。但我需要更改完成按钮的文本。 一旦我输入以下行 i18n.doneBtn,静态页面就会出现,但动态执行会停止,并且不会出现游览。 你对如何解决它有什么建议吗?谢谢!

       "fnInitComplete": function (){
        $('#accessModal').modal('show');
        {% if request.user.indTutorial %}

            // Define the tour!
        var tour = {
          id: "hello-hopscotch-1",
          steps: [
            {        
              title: "View the Momentum Rankings",
              content: "Algorithms analyze millions of data points to find the fastest growing companies in any industry.",
              target: "tag-page-title",
              width: 450,
              placement: "bottom",
              showCloseButton: true
            },
            {       
              title: "See momentum scores",
              content: "Click on a company to understand the factors that drive their score.",
              //target: "allResultTable",
              target: document.querySelector(".sorting_1"),
              placement: "bottom",
              showCloseButton: true,
              showPrevButton: true,
              width: 450,
              // the title of the done button - next
              i18n.doneBtn: "Next"
            }
          ],

          onEnd: function() {
            window.location.href = '/company/' + $('.my-row').attr('id');
          }
        };

【问题讨论】:

    标签: jquery linkedin hopscotch


    【解决方案1】:

    i18n 属性应该是一个对象,并且应该在您的游览的顶层。

    它应该看起来像这样:

    var tour = {
      id: "hello-hopscotch-1",
      steps: [
        {        
          title: "View the Momentum Rankings",
          content: "Algorithms analyze millions of data points to find the fastest growing companies in any industry.",
          target: "tag-page-title",
          width: 450,
          placement: "bottom",
          showCloseButton: true
        },
        {       
          title: "See momentum scores",
          content: "Click on a company to understand the factors that drive their score.",
          //target: "allResultTable",
          target: document.querySelector(".sorting_1"),
          placement: "bottom",
          showCloseButton: true,
          showPrevButton: true,
          width: 450,
        }
      ],
    
      onEnd: function() {
        window.location.href = '/company/' + $('.my-row').attr('id');
      },
    
      i18n: {
        // the title of the done button - next
        doneBtn: "Next"
      }
    };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-03-27
      • 1970-01-01
      • 2020-05-05
      • 2017-01-12
      • 2011-07-14
      • 2018-06-10
      • 2019-02-19
      相关资源
      最近更新 更多