jquery-mobile

<select> not working in Phonegap app on Android 2.3.3

…衆ロ難τιáo~ 提交于 2019-12-17 18:54:50
问题 I'm working on Phonegap app for Android and iOS. Most of the stuff works pretty well but I'm experiencing a problem with <select> tag. It's enhanced with jQuery mobile and on that version of Android when the appropriate div is clicked / tapped the options are not showing up. They show up when I do two clicks / taps: on a div containing <select> on a area above the div In that scenario options show up and when selected change event is fired and code bind to it is executed. I found these two

Jquery : Append querystring to all links

情到浓时终转凉″ 提交于 2019-12-17 18:43:09
问题 I would like to append a query string onto all dynamic links within a page - to fix a bug in a old release - is this possible? Any ideas? 回答1: Something like this? var querystring = 'myquerystringtoadd'; $('a').each(function() { var href = $(this).attr('href'); if (href) { href += (href.match(/\?/) ? '&' : '?') + querystring; $(this).attr('href', href); } }); Working example. 回答2: This solution with native javascript : var querystring = 'yourQueryStringHere=;-)'; document.addEventListener(

How to populate a jQuery Mobile ListView with JSON data?

ε祈祈猫儿з 提交于 2019-12-17 17:55:07
问题 I'm developing a webapp here using HTML and jQuery Mobile (JQM), so I'm pretty new at this. What I'm trying to do here is to populate a JQM listview with a list of names. Each of this names will link to a new page with personal data being displayed (Full name, address, date of birth, etc). Currently, because of my lack of knowledge, I manually create a new .html file for EACH individual person (e.g. johnDoe.html for a fictional character Mr. John Doe). I then physically link the list elements

How to swipe between several jquery mobile pages?

血红的双手。 提交于 2019-12-17 17:54:10
问题 Here is the code extract which works well with 2 pages: <script> $(document).ready(function() { window.now = 1; $('#device1').live("swipeleft", function(){ window.now++ $.mobile.changePage("#device"+window.now, "slide", false, true); }); $('#device2').live("swiperight", function(){ window.now--; $.mobile.changePage("#device"+window.now, "slide", true, true); }); }); </script> ... <div data-role="page" id="device1"> ... </div><!-- /page --> <div data-role="page" id="device2"> ... </div><!--

How to store and retrieve image to localStorage?

社会主义新天地 提交于 2019-12-17 17:34:48
问题 Thought I had this, but no. The goal: snap a photo (insurance card), save it locally, and retrieve it later. // Get a reference to the image element var elephant = document.getElementById("SnapIt_mobileimage_5"); var imgCanvas = document.createElement("canvas"), imgContext = imgCanvas.getContext("2d"); // Make sure canvas is as big as the picture imgCanvas.width = elephant.width; imgCanvas.height = elephant.height; // Draw image into canvas element imgContext.drawImage(elephant, 0, 0,

JQuery Mobile Fixed Toolbar and Footer Bar disappears?

老子叫甜甜 提交于 2019-12-17 17:28:38
问题 I am using JQuery Mobile version 4.1a and using: data-position="fixed" on both header and footer. When I scroll the content it disappears and then appears again. Is there any way to make it stay in it's position and not disappear everytime I scroll the page? Thanks 回答1: Add data-tap-toggle="false" to the element or Add this to Javascript $("[data-role=header]").toolbar({ tapToggle: false }); Older versions of jQuery use .fixedtoolbar() . jQuery Mobile Docs - Events 回答2: I found a solution. I

fix the orientation on page to landscape only in Jquery-mobile

青春壹個敷衍的年華 提交于 2019-12-17 16:53:39
问题 How can the orientation of a page be landscape only as i am using jquery mobile for my webapp? The page contains some tabular data which can't be shown in the portrait mode in the mobile version... Take a look of my layout.. http://jsfiddle.net/nY5ZF/1/ Can this be fixed??? 回答1: We now have responsive tables in jquerymobile 1.3.1, you could use that... http://jquerymobile.com/demos/1.3.0-beta.1/docs/tables/ As its not possible to lock the orientation in webapps unlike hybrid apps (phonegap).

fix the orientation on page to landscape only in Jquery-mobile

冷暖自知 提交于 2019-12-17 16:53:09
问题 How can the orientation of a page be landscape only as i am using jquery mobile for my webapp? The page contains some tabular data which can't be shown in the portrait mode in the mobile version... Take a look of my layout.. http://jsfiddle.net/nY5ZF/1/ Can this be fixed??? 回答1: We now have responsive tables in jquerymobile 1.3.1, you could use that... http://jquerymobile.com/demos/1.3.0-beta.1/docs/tables/ As its not possible to lock the orientation in webapps unlike hybrid apps (phonegap).

How to upload file with Phonegap and JqueryMobile?

杀马特。学长 韩版系。学妹 提交于 2019-12-17 16:14:14
问题 I'm building a mobile app for Android with JQM and PhoneGap. I need to upload a file (image) to remote server (from galery or take a picture with camera). Basically it can be done using phonegap file API, the problem is that the server was written to support simple POST submission. What I need is to "simulate" in my app request exact as it would sent from the following html form. In addition I need to get the server response. <form name="myWebForm" ENCTYPE="multipart/form-data" action="http:/

jQuery Mobile pageinit/pagecreate not firing

我的未来我决定 提交于 2019-12-17 15:42:25
问题 I have 5 pages - for ease lets say: one.html two.html three.html four.html five.html When I load each individual page, both pageinit and pagecreate are firing correctly. The Problem: When I go from one.html to two.html, pageinit and pagecreate both fire, BUT when I go back to one.html (from two.html), pageinit and pagecreate DO NOT fire. Why is this and how can I always fire pageinit and pagecreate on page load, as well as navigating through each page? Update: For each page I have: <div data