jquery-mobile

Jquery Mobile checkbox-list does not update when adding items and “refreshing” the script to style it

霸气de小男生 提交于 2019-12-31 04:57:30
问题 It is very easy to add a checkbox list in JQuery Mobile, the scripts automatically style/change the following html and give it functionality: <fieldset data-role="controlgroup" id="liste" class="liste"> <legend>Choose as many snacks as you'd like:</legend> <input type="checkbox" name="checkbox-1a" id="checkbox-1a" class="custom"> <label for="checkbox-1a">Cheetos</label> <input type="checkbox" name="checkbox-2a" id="checkbox-2a" class="custom"> <label for="checkbox-2a">Doritos</label> <input

Phonegap store local db

穿精又带淫゛_ 提交于 2019-12-31 04:38:07
问题 I have a bulk of data in my app. I need it in case the app runs offline. Currently I have it in a data.js file and use the jQuery data function to manage it. There are 1800 lines like this. ~500kb in total. $.data(db,'Aarstraße',['34236:1','34246:2','34270:4','34290:6',...]); Is there a better way to store this data? My main concern is performance. Not to query some data but the app performance in total like RAM usage and startup time. 回答1: My recommendation is for you to pre-populate a

Multiple Calendars Displayed or Value Selected not displaying correctly

£可爱£侵袭症+ 提交于 2019-12-31 04:06:07
问题 Ok I'm using the jQuery Mobile Framework and adding the Experimental Date Picker but I encounter two results. Following the instructions on the page, this is what I have so far. Code Efforts #1: $(document).ready(function() { $('.hasDatepicker').hide(); $('#date-of-birth').each(function() { $(this).focus(function() { $(this).next().show('fast'); }); $(this).blur(function() { $(this).next().hide('fast'); }); }); }); Now this shows the one calendar (as I would like) but on date selection the

Jquery Mobile - Ajax is enabled by default but I get full page refresh on POST

眉间皱痕 提交于 2019-12-31 02:24:05
问题 I created a jQuery mobile application using ASP.NET MVC and in the jQuery mobile documentation it's mentioned that Ajax is enabled by default for page transitions on clicking a link or submitting the form. In my case, when I submit the form, I get a full page refresh and I don't see the spinning loader. I get a flash of blank page and then page gets loaded. My page is similar to a survey page where one question will be displayed with list of options to select and then click Next. When user

How to fix a header with jQueryMobile

怎甘沉沦 提交于 2019-12-31 00:58:10
问题 I am new to jQueryMobile. I have one problem regarding fixed headers. I have this code in my header div: <div data-role="header" hieght="100px" data-position="fixed" data-theme="a" style="min-height: 45px;"> <h1>Nieuwspoort</h1> </div> In this div I have put data-position="fixed". The header is fixed but after I scroll the page my header is hidden and after I am done scrolling my header becomes visible again. 回答1: Proper fixed header support has been introduced into jQueryMobile from version

jQuery mobile popup on pageinit

99封情书 提交于 2019-12-31 00:49:09
问题 I want a popup to open as soon as the page loads but seem to be getting stuck with the spinning wheel. Here is a fiddler to demonstrate the problem any help would be appreciated. http://jsfiddle.net/Ohpyx/UGfXG/ The code I'm using is: $(document).live('pageinit',function(event){ $('#popupBasic').popup('open'); })​ 回答1: This worked for me: $(document).on('pageinit', '.ui-page',function(event){ setTimeout(function () { $('#popupBasic').popup('open'); }, 0);//Note the comment below from @Taifun.

Display Loading Animation Spinner while Loading Page

跟風遠走 提交于 2019-12-30 13:30:35
问题 I want to show loading animation spinner in a JQueryMobile page which is loaded w/ ajax off. The page is loaded with data-ajax="false" or rel="external" I tried on pagebeforecreate and pageshow event but its NOT working as I expected: $( '#page' ).live( 'pagebeforecreate',function(event){ $.mobile.loading('show'); }); $( '#page' ).live( 'pageshow',function(event){ $.mobile.loading('hide'); }); 回答1: There's a slight problem with your request. First, you will not be able to show/hide ajax

$.mobile is undefined (Worklight + jQuery Mobile)

一世执手 提交于 2019-12-30 12:24:48
问题 I have main html: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" /> <title>Home</title> <link rel="stylesheet" href="js/jquery.mobile-1.2.0/jquery.mobile-1.2.0.css" type="text/css" media="screen" title="no title" charset="utf-8" /> <link rel="stylesheet" href="css/Home.css" type="text/css" media="screen" title="no title" charset="utf-8" /> <link rel="stylesheet"

$.mobile is undefined (Worklight + jQuery Mobile)

爱⌒轻易说出口 提交于 2019-12-30 12:24:17
问题 I have main html: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" /> <title>Home</title> <link rel="stylesheet" href="js/jquery.mobile-1.2.0/jquery.mobile-1.2.0.css" type="text/css" media="screen" title="no title" charset="utf-8" /> <link rel="stylesheet" href="css/Home.css" type="text/css" media="screen" title="no title" charset="utf-8" /> <link rel="stylesheet"

$.mobile is undefined (Worklight + jQuery Mobile)

*爱你&永不变心* 提交于 2019-12-30 12:24:03
问题 I have main html: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" /> <title>Home</title> <link rel="stylesheet" href="js/jquery.mobile-1.2.0/jquery.mobile-1.2.0.css" type="text/css" media="screen" title="no title" charset="utf-8" /> <link rel="stylesheet" href="css/Home.css" type="text/css" media="screen" title="no title" charset="utf-8" /> <link rel="stylesheet"