2013-04-05 43 views
1

我正在測試lungo框架,並通過閱讀它們的示例(http://lungo.tapquo.com/howto/prototype),它不起作用。lungo框架不能與示例代碼

我使用他們的框架代碼:

<body class="app"> 

<section id="main" data-transition=""> 
    <article id="main-article" class="active"> 
     test. 
    </article> 
</section> 

<script src="components/quojs/quo.js"></script> 
<script src="components/lungo/lungo.js"></script> 

<script type='text/javascript'> 
    Lungo.init({ 
     name: 'example' 
    }); 
</script> 

</body> 

我在控制檯中沒有錯誤。什麼可能導致這個問題? 在此先感謝。

+0

define *不起作用*。 – Raptor 2013-04-05 09:34:32

+0

定義?你什麼意思? – 2013-04-05 09:38:33

+0

什麼顯示在屏幕上?我知道你沒有錯誤,但屏幕上有什麼?所有出現的「 – Raptor 2013-04-05 09:54:41

回答

1

如果這就是你所有的HTML,那麼你錯過了一大堆CSS文件等。你能分享一個JS小提琴或更長的代碼示例?你沒有得到任何JS錯誤的方式意味着我可能會錯過一些CSS。另外,你使用的是什麼版本的Lungo?你是如何獲得它的?

的問題很多:)不過,我創建了一個基本朗格的jsfiddle前一陣子 - http://jsfiddle.net/otupman/vz59n/ - 嘗試,看看它是否工作。在「外部資源」部分中,您將找到包含使其工作的JS的CSS &。

我使用(如S/O不會讓我沒有張貼代碼的jsfiddle鏈接)簡單的代碼僅僅是這樣的:

<section id="main" > 
    <header data-title="JsFiddle Lungo"> 
     <nav class="left"> 
      <a data-icon="home"></a> 
     </nav> 
    </header> 
    <article class="active" id="first_article"> 
     <strong>Simple Example</strong> 
     <a href="#second_article" data-router="article">Second article</a> 
     <br/> 
     <a href="#second_section" data-router="section">Second section</a> 
    </article> 
    <article id="second_article"> 
     <strong>Second article</strong> 
     <a href="#first_article" data-router="article">First article</a> 
     <br/> 
     <a href="#second_section" data-router="section">Second section</a> 
    </article> 
</section> 

所有的CSS/JS文件的來源以Lungo爲例,一個CSS是http://lungo.tapquo.com/example/components/lungo/lungo.css