天道酬勤,学无止境

jquery-mobile

How to Skip over divs?

I am doing a mobile html5 / jquery quiz where I preload all the questions from the server into one html file, then have buttons to move back and forth between the questions. Works nice, but now I am needing to skip certain questions if the person answers "no" via a radio yes/no input to question 20, then 21 and 22, doesn't need to be shown. How can I do this? this is the code snipplet I been using: JSFIDDLE: http://jsfiddle.net/gN9Xg/ Want to skip over question 2 if the person answers "no" on question 1 function doSubmit(obj) { $(obj).parents(".question").first().next().show(); $(obj).parents(

2021-09-24 11:21:32    分类:问答    javascript   jquery   jquery-mobile

Android writing phone data to screen

Im trying to write information about my phone to my app screen. What am i doing wrong below here? I have the proper permissions set in my manifest. Im using Phonegap to develope the app. With Jquery. The app lanuches it jsut doesn not display the phone information. <p id="deviceProperties">Loading device properties...</p> Full page code <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="format-detection" content="telephone=no" /> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width

2021-09-24 06:58:09    分类:问答    android   cordova   jquery-mobile

将加载的 CSS 应用于动态创建的 HTML(apply loaded CSS to dynamically created HTML)

问题 我正在 JQuery Mobile listView 上使用此代码动态添加一些 HTML 内容: 此代码正在使用#page容器加载到我的index.html文件中 <meta charset="utf-8"> <link rel="stylesheet" href="css/pages/notifications-list-view.css"> <div id="notifications-wrapper"> <div class="notifications-content"> <div data-role="navbar" id="navbar" class="notifications-categories"> <ul> <li> <a href="#" id="unread-notifications"> <span class="title">Unread notifications</span> <i class="fa fa-circle fa-fw"></i> <span class="count">4</span> </a> </li> <li> <a href="#" id="all-notifications" style="height: 60px; line-height: 60px; ">All notifications</a> </li> <

2021-09-24 06:56:08    分类:技术分享    jquery   css   jquery-mobile

通过使用 JavaScript 循环遍历数组元素来动态添加可折叠 div(Dynamically adding collapsible divs by looping through array elements with JavaScript)

问题 我正在尝试使用 JavaScript 遍历数组并将可折叠的 div 附加到可折叠的集 div。 我让它工作,但不确定发生了什么。 我搜索了 stackoverflow,但无法找到直接答案。 我还使用了控制台,我可以让数组中的每个值出现在控制台中。 我试图让一周中的每一天都出现,这样用户就可以点击这一天来查看时间列表。 目前,我的代码仅导致星期一显示为标题,然后可以单击并展开该标题。 当它展开时,它会显示一周中剩余的几天。 我猜我做事的顺序有问题。 这是我的 javascript 代码: $(document).on("pagebeforeshow","#ClassTimes",function(){ $("#classList").empty(); var collapsibleSet = $("#classList"); var collapsible = $('<div data-role="collapsible"></div>'); for (i=0; i<showPrice.length; i++) { var maki = showPrice[i].day; collapsible.append("<h2>" + maki + "</h2>"); } collapsibleSet.append(collapsible); collapsibleSet

2021-09-24 06:16:04    分类:技术分享    javascript   jquery   jquery-mobile

AppLaud + jQuery Mobile 1.3.1 + jQuery 1.10.1 + Phonegap 1.9.0(为什么不工作?)(AppLaud + jQuery Mobile 1.3.1 + jQuery 1.10.1 + Phonegap 1.9.0 (why not work?))

问题 朋友们,我开始使用 PhoneGap + jQuery Mobile 在 AppLaud 应用程序中进行开发。 Applaud 开始了一个新项目: - JQuery 1.7.2 - JQuery Mobile 1.3.1 - PhoneGap 1.9.0 我的文件夹资产如下: - [assets] - [www] --- [jquery.mobile] ---- [images] ---- jquery-1.7.2.min ---- jquery.mobile-1.3.1.css ---- jquery.mobile-1.3.1.js ---- jquery.mobile-1.3.1.min.css ---- jquery.mobile-1.3.1.min.js --- cordova-1.9.0.js --- index.html 我的 index.html 文件包含以下内容: <!DOCTYPE HTML> <html> <head> <meta name="viewport" content="width=320; user-scalable=no" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Minimal AppLaud App</title>

2021-09-24 05:05:20    分类:技术分享    android   jquery-mobile   cordova   applaud

CSS: Android Web App: Color gradient issue

I am developing an Application with jQuery Mobile and Phonegap. I want to have a color gradient from #3c3c3c (grey) to #000000 (black) in the background but when I use this code background: -webkit-linear-gradient(top, #3c3c3c, #000000); you can see just a few big bars with different grey shades. So there is no linear gradient. Also you are able to see some green and some violet bars. - Sorry as a new user I am not able to insert a Screenshot - I also tried to instead insert a background image which shows a color gradient but this also looks as described above (we have also tried to maximize

2021-09-24 04:21:31    分类:问答    css   jquery-mobile

在自定义跨度 jQuery Mobile 滑块标签上设置字体(Set font on custom span jQuery Mobile slider labels)

问题 你好,互联网的好心人, 我在 jQuery Mobile 范围滑块的左侧和右侧添加和附加一些文本内容作为标签,这可以正常工作,但我似乎无法让字体正常工作......字体显示不正确,而且我似乎无法在跨度内设置/重置标签字体。 这是一个测试页面:http://www.simdock.com/amort-test/dev-scratch/amort/scratchtesting-Slider-label-font-issue.html 这是放置在滑块左侧和右侧的自定义滑块标签(最小和最大滑块范围值)的 javascript 代码: $.fn.extend({ sliderLabels: function(left,right) { var $this = $(this); var $sliderdiv= $this.next("div.ui-slider[role='application']"); // $sliderdiv .prepend('<span class="ui-slider-inner-label" style="position: absolute; left:0px; top:20px;">'+left+ '</span>') .append('<span class="ui-slider-inner-label" style="position

2021-09-24 03:53:07    分类:技术分享    jquery-mobile   slider   jquery-ui-slider

PhoneGap Javascript not working other than in index file

Hi I'm trying to run a javascript function (an alert to test) but it is not firing when in a page other than the index.html. here is an example of a page that is not firing the javascript alert ( note that < is removed from all of the tags so as to render in stack overflow): <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <script type="text/javascript" charset="utf-8" src="phonegap-1.0.0.js"></script> <script type="text/javascript"

2021-09-24 02:42:50    分类:问答    javascript   jquery-mobile   cordova

AppLaud + jQuery Mobile 1.3.1 + jQuery 1.10.1 + Phonegap 1.9.0 (why not work?)

friends, I'm starting to develop in AppLaud applications with PhoneGap + jQuery Mobile. Applaud started a new project: - JQuery 1.7.2 - JQuery Mobile 1.3.1 - PhoneGap 1.9.0 My folder assets is as follows: - [assets] - [www] --- [jquery.mobile] ---- [images] ---- jquery-1.7.2.min ---- jquery.mobile-1.3.1.css ---- jquery.mobile-1.3.1.js ---- jquery.mobile-1.3.1.min.css ---- jquery.mobile-1.3.1.min.js --- cordova-1.9.0.js --- index.html and my index.html file contains the following: <!DOCTYPE HTML> <html> <head> <meta name="viewport" content="width=320; user-scalable=no" /> <meta http-equiv=

2021-09-23 22:16:13    分类:问答    android   jquery-mobile   cordova   applaud

Jquery Mobile DateBox plugin only working when linked directly to page

I am using the DateBox ( http://dev.jtsage.com/jQM-DateBox/ ) plugin for a page with the latest build of JqueryMobile but am finding an odd bug. When I open my app on index.html and navigate through the pages to the page with the date picker is I get this - http://cl.ly/19022K40472e3k0D0D2H However if I go direct to the page via the address bar it works fine and shows up as it should. So just wondering is anyone else having problems with this? Or any idea how to fix it? Also I might add does anyone know how I can have the current date show in the text field? Thanks.

2021-09-23 20:15:28    分类:问答    jquery-mobile   datebox