1

ウェブサイトの 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');
          }
        };
4

1 に答える 1

3

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"
  }
};
于 2013-08-29T20:08:23.897 に答える