2016-07-21 5 views
0

ブートストラップツアーを設定しようとしています。私は2つのページ(Design.vbhtmlとEditHomePage.vbhtml)を持っています。どちらも、(_DesignerLayout.vbhtml)というレイアウトページを使用します。ブートストラップ、ツアー、jqueryなどのスクリプトとスタイルシートはすべてレイアウトページに表示されています。すべてのものが正しいです。ASP.NET/MVCレイアウトページのブートストラップツアー

ツアーはデザインページで開始され、最初の3つのステップが正しく表示されます。しかし、それが4番目のステップに到達すると(3番目のステップと呼ばれ、混乱しないように)、2番目のページに進みますが、ステップを続行しません。ツアーは止まる。

私の要素はすべてdivタグのIDです(ウェルカムステップ、最初のステップなど)。私はそれらがすべて正しいことを知っています。私の道で何かをしなければならない。

ツアーでレイアウトページを使用している人がどこにでもいて、他の誰かを見つけることができないので、デザインページからレイアウトページにジャンプするステップと何か関係があると思いますedithomepageページ。任意のアイデアをいただければ幸いです!

ここに私のブートストラップ・ツアーコードがある---

Design.vbhtml(最初のページ)

$(function() { 
    // Instance the tour 
    var tour = new Tour({ 
     backdrop: true, 
     steps: [ 
     { 
      element: "#welcome-step", 
      title: "Welcome!", 
      content: "Begin this tour to see how you can design the look of your website.", 
      orphan: true, 
      path: "/ClubAthleticsTemplate/Organization/Design/" & "@ViewBag.OrganizationId" 
      // this element is on the design.vbhtml page 
     }, 
     { 
      element: "#first-step", 
      title: "Change the Look", 
      content: "Use this section to design how your website looks. You can choose which pages you want to include on your website.", 
      path: "/ClubAthleticsTemplate/Organization/Design/" & "@ViewBag.OrganizationId" 
      // this element is on the design.vbhtml page 
     }, 
     { 
      element: "#second-step", 
      title: "Edit Pages", 
      content: "These are the different pages you can edit for your website. Click on each one to customize.", 
      path: "/ClubAthleticsTemplate/Organization/Design/" & "@ViewBag.OrganizationId" 
      // this element is on the _DesignerLayout.vbhtml page 
     }, 
     { 
      element: "#third-step", 
      title: "Main Photo", 
      content: "You can upload a main photo that will appear on your front page.", 
      path: "/ClubAthleticsTemplate/Organization/EditHomePage/" & "@ViewBag.OrganizationId" 
      // this element is on the EditHomePage.vbhtml page 
     }, 
     { 

      element: "#fourth-step", 
      title: "Main Photo Display", 
      content: "You can specify whether or not you want the main photo show at the top of all of your pages.", 
      path: "/ClubAthleticsTemplate/Organization/EditHomePage/" & "@ViewBag.OrganizationId" 
      // this element is on the EditHomePage.vbhtml page 
     }, 
     { 
      element: "#fifth-step", 
      title: "Page Headline", 
      content: "This is where you can set a title for your page.", 
      path: "/ClubAthleticsTemplate/Organization/EditHomePage/" & "@ViewBag.OrganizationId" 
      // this element is on the EditHomePage.vbhtml page 
     }, 
     { 
      element: "#sixth-step", 
      title: "Page Content", 
      content: "Here is where you add all your content for your page. You can add text, images, media, tables, etc.", 
      path: "/ClubAthleticsTemplate/Organization/EditHomePage/" & "@ViewBag.OrganizationId" 
      // this element is on the EditHomePage.vbhtml page 
     }, 
     { 
      element: "#seventh-step", 
      title: "Save Changes", 
      content: "Make sure to hit the 'Save' button when finished!", 
      path: "/ClubAthleticsTemplate/Organization/EditHomePage/" & "@ViewBag.OrganizationId" 
      // this element is on the EditHomePage.vbhtml page 
     } 
     ] 
    }); 

    // Initialize the tour 
    tour.init(); 

    // Start the tour 
    tour.start(); 
}); 
; 

答えて

0

私はそのコピーを発見し、2ページ目にツアー全体を貼り付けることにそれを取得します完璧に動作します。 2つの異なる場所に同じコードがあり、変更するたびに両方の場所を変更しなければならないので、これは最高のコーディング方法ではありません。しかし、今のところ、それは動作します。

関連する問題