2013-03-05 64 views
1

我想用jquery mobile與玉器&快遞。我對玉有點新鮮,能幫我弄清楚這裏出了什麼問題,真是太好了。我使用的是標準的jQuery Mobile的1.3文件包含一個名爲prejQuery手機與玉器不工作

文件夾中的zip下載我有兩個文件的佈局:

doctype 5 
html 
    head 
    title= title 
    meta(charset='utf-8') 
    meta(name='viewport',content='width=device-width, initial-scale=1') 
    meta(name='apple-mobile-web-app-capable',content='yes') 
    meta(name='apple-mobile-web-app-status-bar-style',content='black') 
    link(rel='stylesheet', href='/pre/jquery.mobile-1.3.0.min.css') 
    link(rel='stylesheet', href='/pre/jquery.mobile.structure-1.3.0.min.css') 
    link(rel='stylesheet', href='/pre/jquery.mobile.theme-1.3.0.min.css') 
    script(src='/pre/jquery-1.9.1.min.js') 
    script(src='/pre/jquery.mobile-1.3.0.min.js') 

    body 
    block content 

我的內容:

extends layout 
block content 
    div#page1(data-role='page') 
    div(data-theme='a',data-role='header') 
    h3 
     | Header 
    div(data-role='content') 
    a(data-role='button',href='#page1') 
     | Button 
    a(data-role='button',href='#page1') 
     | Button 
    a(data-role='button',href='#page1') 
     | Button 
    div(data-theme='a',data-role='footer',data-position='fixed') 
    h3 
     | Footer 

的問題我得到:

enter image description here

回答

2

您在content.jade中的縮進是錯誤的。下面div#page1(data-role='page')縮進一切,它工作得很好

extends layout 
block content 
    div#page1(data-role='page') 
    div(data-theme='a',data-role='header') 
     h3 Header 
    div(data-role='content') 
     a(data-role='button',href='#page1') Button 
     a(data-role='button',href='#page1') Button 
     a(data-role='button',href='#page1') Button 
    div(data-theme='a',data-role='footer',data-position='fixed') 
     h3 Footer 

正如你可以看到,你甚至可以不使用管道|

+0

感謝簡化代碼,玉是一個有點新的給我,我用HTTP:/ /www.htmltojade.com/將其從html轉換我想它給了我一些東西 – Akshat 2013-03-06 07:45:05