Javascript 翡翠+;jquerymobile,如何添加一些按钮?
正如编译成HTML的.jade文件一样,我对JQuery Mobile也是新手。我正在这个jade文件中初始化JQuery MobileJavascript 翡翠+;jquerymobile,如何添加一些按钮?,javascript,jquery,html,mobile,pug,Javascript,Jquery,Html,Mobile,Pug,正如编译成HTML的.jade文件一样,我对JQuery Mobile也是新手。我正在这个jade文件中初始化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.
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移动按钮的内容。
谢谢 关于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();
});
这里的问题是什么?那为什么不合适呢?运行您的代码并尝试!或多或少,我想知道如何将复选框更改为某种JQuery移动按钮。我目前无法测试此代码。