0

就像编译成 HTML 的 .jade 文件一样,我也是 JQuery Mobile 的新手。我正在这个玉文件中初始化 JQuery Mobile ..

doctype 5
html
  head
    title= title
    meta(name='viewport', content='width=device-width,initial-scale=1')
    link(rel='stylesheet', href='/stylesheets/jquery.mobile-1.2.0.min.css')
    script(type='text/javascript', src='/javascripts/jquery-1.8.2.min.js')
    script(type='text/javascript', src='/javascripts/jquery.mobile-1.2.0.min.js')

这合适吗?另外我将如何改变这样的事情......

if (elem.onload == 1)                                                   
  input(type = 'checkbox', name = elem.name + '|onl', checked)
else
  input(type = 'checkbox', name = elem.name + '|onl') 
| OnLoad

对于使用 JQuery 移动按钮的东西。谢谢!

4

1 回答 1

0

关于jQuery部分,它可以正常工作,因为我刚刚测试了这段代码,点击它们时两个内容都消失了。

!!! 5
html(lang="en")
  head
    title Holamundo!
    script(type='text/javascript', src='http://code.jquery.com/jquery-1.9.1.js')
  body
    h1#headTitle Hello, World
    p#content This is an example of Jade.
    script
      $('#headTitle').click(function() {
        $(this).hide();
      });
      $('#content').click(function() {
        $(this).hide();
      });
于 2013-04-18T09:54:01.783 回答