2013-04-05 87 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