是否有人在jQuery mobile上有一个很好的约会选择器?
我将让用户选择"从"日期和"到"日期,我没有找到任何有利于这种情况.
有任何想法吗?
我真的没有得到这个chrome错误:
未捕获的SecurityError:无法在"历史记录"上执行"replaceState":无法在原点为"null"的文档中创建
在Edge,Firefox和IE中没有错误.
我使用jquery 1.11.1和jquery mobile 1.4.5.
这是我的索引文件:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/xy.min.css" />
<link rel="stylesheet" href="css/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="css/jquery.mobile.structure-1.4.5.min.css" />
<title></title>
</head>
<body>
<div data-role="page">
<div data-role="header" data-add-back-btn="true">
<p align="center">Test</p>
</div>
<ul data-role="listview" data-filter="true" data-filter-placeholder="Kategorie suchen" data-inset="true" data-count-theme="b">
<li><a href="assets/beck/index.html" data-rel"dialog" rel ="external">Bäckereien </a></li>
</ul>
</div>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
任何帮助非常感谢!
我为其动画功能和动态页面支持选择了jQuery Mobile而不是其他框架.
但是,我遇到了造型方面的麻烦.我想保留基本页面样式以执行页面转换.但我还需要完全自定义标题,列表视图,按钮,搜索框的外观......只处理颜色是不够的.我需要处理尺寸,位置,边距,填充等.
因此,我努力使用jQuery Mobile添加的额外div和类,以便用CSS覆盖它们.但它非常耗时,从头开始重写css会更快......
有没有办法加载一个最小的jQuery Mobile css文件?
或者我应该考虑其他移动框架?我需要处理页面转换,ajax调用,Cordova兼容性,当然还有完全可自定义的html/css ...
我找到了一些与"phonegap canvas signature"相关的帖子,但是他们没有帮助.我有一些下拉框,文本框和一个签名字段.我想在sqlite数据库中插入这些字段.
我的数据库表创建如下所示:
tx.executeSql("CREATE TABLE IF NOT EXISTS parts(id INTEGER PRIMARY KEY AUTOINCREMENT,nr,productId,description,toolsVerified)");
tx.executeSql("CREATE TABLE IF NOT EXISTS costs(id INTEGER PRIMARY KEY AUTOINCREMENT,nr,date,starttime,endtime,reason,cost)");
tx.executeSql("CREATE TABLE IF NOT EXISTS sign(orderNr unique ,rapport,sign)");
Run Code Online (Sandbox Code Playgroud)
读取字段值,如正常的文本和下拉菜单签名字段就像
kundusSign = $("#mKundusskirt")[0];
kundensUnderSkrift = kundusSign.toDataURL();
Run Code Online (Sandbox Code Playgroud)
以下是插入数据的代码:
db
.transaction(function(tx) {
// for parts table
tx
.executeSql(
"insert into parts(nr,productid,description,toolsVerified) values(?,?,?,?)",
[ nr, productId, desc, tool ]);
// for cost table
tx
.executeSql(
"insert into costs(nr,date,starttime,endtime,reason,cost) values (?,?,?,?,?,?)",
[ nr, date, startTime, endTime, reason, cost ]);
// for …Run Code Online (Sandbox Code Playgroud) 是否有必要包含jQuery的核心,还是单独的移动框架?根据我的尝试,我得出结论,这两个文件都是必要的,但我想确定这个问题.
在我的移动网站上.我一直在尝试加载Adsense移动广告,但在页面加载后它们会继续占用整个页面.
我确实发现,如果我禁用ajax,页面会加载广告.这仅适用于我加载的第二页,因为我点击了带有标签的链接...
data-ajax="false"
Run Code Online (Sandbox Code Playgroud)
这使得下一页加载完美.
问题:加载的第一个页面将被adsense广告覆盖,因为启用了ajax(我认为).
基本上我的页面的第一部分看起来像这样......
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.js"></script>
<script language="text/javascript">
$(document).bind("mobileinit", function () {
$.mobile.ajaxEnabled = false;
});
</script>
</head>
<body>
<div data-role="header">
<h1>Angry Birds Cheats</h1>
</div>
<div data-role="content">
<div>
<script type="text/javascript"><!--
// XHTML should not attempt to parse these strings, declare them CDATA.
/* <![CDATA[ */
window.googleAfmcRequest = {
client: '',
format: '',
output: '',
slotname: '',
};
/* ]]> */
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_afmc_ads.js"></script>
</div>
Run Code Online (Sandbox Code Playgroud)
我确实尝试在代码中禁用ajax,但我不认为这是因为广告仍占用整个页面...
我想也许我可以在某个页面启动访问者并将它们重定向到非ajax的页面.
使用JQuery Mobile我有一个从数据库动态填充的选择框.截至目前,此复选框的人口正在完美运行.我添加了一个功能,其中包含一个通过"点击"事件调用功能的按钮.此功能的作用是知道是否已填充此特定复选框; 如果它没有那么它根本不会做任何事情,但否则它会顺利运行.我的问题是确定这个选择框是否为空.
这是我正在处理的一个非常简单的例子:
<li>
<label for="fruit_name">Fruit</label>
<select name="some_fruit" id="fruit_name" onclick="populate_box('fruit', this);">
</select>
</li>
Run Code Online (Sandbox Code Playgroud)
我的函数,从一个单独的按钮调用,如下所示:
function isSelextBoxEmpty(selectBoxId) {
var selected_value = $('#fruit_name');
/* More options... still testing the proper way:
var selected_value = $('#fruit_name').text;
var selected_value = $('#fruit_name').value;
var selected_value = $('#fruit_name').length;
var selected_value = $('#fruit_name option:selected', this);
var selected_value = document.getElementById('fruit_name');
var selected_value = document.getElementById('fruit_name').length;
var selected_value = document.getElementById('fruit_name').value;
var selected_value = document.getElementById('fruit_name').innerHTML;
*/
if(selected_value) {
alert("NOT null, value: " + selected_value);
//do something
}
else {
alert("null, value: …Run Code Online (Sandbox Code Playgroud) 我正在使用Highcharts和jQuery Mobile.
我在jQM data-role="content"容器中绘制了一个区域图,在该容器中我有以下div:
<div style="padding-top: 5px; padding-bottom: 10px; position: relative; width: 100%;">
<div id="hg_graph" style="width: 100%"></div>
</div>
Run Code Online (Sandbox Code Playgroud)
我的高图图是从他们的一个示例中获取的基本图,其中我没有设置图表width属性.
在第一次加载时,图形超出了包含div的宽度,但是当我调整浏览器大小时,它会捕捉到适当的宽度.
我怎样才能使它的宽度在第一页加载时正确,而不仅仅是调整大小?
我已经回顾了关于堆栈溢出的类似帖子,但没有一个解决方案似乎有效.
更新
我发现问题在于,<rect>Highcharts 动态生成的标签在页面加载时占据了浏览器窗口的全宽,而根本没有从容器div宽度中获取它.这是我检查时生成的html:
<rect rx="5" ry="5" fill="#FFFFFF" x="0" y="0" **width="1920"** height="200"></rect>
我试图在JSFiddle中重现,但它似乎在那里工作正常,这真的让我难过.这是我的JSFiddle代码:http://jsfiddle.net/meandnotyou/rMXnY
在jquery mobile中,您经常处理数据角色.是否有jquery-mobile中所有数据角色的列表?我想我会觉得有帮助.
jquery-mobile ×10
javascript ×5
jquery ×5
html ×2
ajax ×1
android ×1
cordova ×1
css ×1
css3 ×1
highcharts ×1
html5 ×1
sqlite ×1