jquery-mobile

Intel XDK: Connecting your mobile app to a database

自古美人都是妖i 提交于 2019-12-22 07:02:14
问题 I am currently developing an application which if I don't have a database, the application after building will be heavy. How do I connect the application to a database, either local or remote? Thanks in advance. 回答1: You can use one of the following methods for using database: 1- Using HTML5 client side databases. HTML5 provides four different types of Storage of data on a local client's machine. They are Local Storage. Web SQL Storage. Session Storage Indexed DB It depends on your demands

IOS 11.1 SecurityError (DOM Exception 18): Blocked attempt to use history.replaceState() to change session history URL

风格不统一 提交于 2019-12-22 06:47:36
问题 I am developing a mobile app using Cordova and jQuery Mobile. My app was working fine for iOS 11.0.3 and then when iOS 11.1 came out, I am getting an error and unable to click on any links. The error I get in the safari error console is "SecurityError (DOM Exception 18): Blocked attempt to use history.replaceState() to change session history URL." I have added <meta http-equiv="Content-Security-Policy" content="default-src * data: blob: ws: wss: gap://ready file://*; style-src * 'unsafe

Youtube play button disappears on iphone

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 05:20:34
问题 I have the following simple two page html doc which makes use of Jquery Mobile: <div data-role="page" id="main_page"> <ul id="test" data-role="listview"> <li><a href="#page_1" data-transition="slide">Video</a> </li> <li><a href="#page_1" data-transition="slide">Video</a> </li> </ul> </div> <div data-role="page" id="page_1" data-theme="a">Heres a youtube video: <div id="youtubeVideo" data-theme="a" class="ui-content"> <iframe class="youtube-player" type="text/html" width="100%" src="http://www

unable to play an audio mp3 file in phonegap android

折月煮酒 提交于 2019-12-22 05:18:22
问题 I am new to Phonegap (Cardova),I want to play a local mp3 file,it can play a file from url ,but not a local file.My file is located in Assets --> www --> audio --> Ikhlas.mp3 , I using Jquery Mobile with multiple pages. and in each page I will have to play a different audio file with Oclick Play Button. when ever i click the button to play i got the following errors : 07-19 07:43:58.829: E/MediaPlayer(1081): Attempt to call getDuration without a valid mediaplayer, 07-19 07:43:58.838: E

How to only fire event if flipswitch is manually switched

别说谁变了你拦得住时间么 提交于 2019-12-22 05:15:09
问题 I've created an jQuery Mobile flipswitch like this <select id="flip" data-role="flipswitch"> <option value="animal">Lion</option> <option value="flower">Rose</option> </select> and I listen to changes on this flipswitch $( document ).on( 'change', '#flip', function( e ) { console.log( 'changed' ); } But I don't want the event to be triggered if I change the value of the flipswitch by $( '#flip' ).val( 'flower' ).flipswitch( 'refresh' ); How do I check if a flipswitch has changed by

Drawing canvas for mobile webpages with sketch.js resets ontouch

时光毁灭记忆、已成空白 提交于 2019-12-22 05:04:59
问题 I am using the sketch.js plugin for drawing on HTML5 canvas. While it works fine on desktop computers it seems to have some issues on mobile browsers. The problem is that if I draw 2 different shapes, the canvas will reset to blank as soon as I touch it. Just to be completly clear I will make and example : drawing the number '12' will first draw '1' and then when I start drawing '2' the canvas will clear and only keep the number '2'... <!-- CANVAS --> <canvas id="canvas1" style="width:100%;

How to make Google Maps to request again for location permissions?

随声附和 提交于 2019-12-22 04:56:31
问题 I'm using Google maps in my mobile web app, but it I've noticed that sometimes when maps prompts for location permissions, users accidentally tap on "Deny" instead of "Allow" and they need to reload the page to be correctly located. Is there a way to, i.e., have some JS call that users can trigger, let's say by tapping a button for example, to change their choice on giving location access permissions or make the browser re-prompt for them? Thanks in advance for any help :) 回答1: This is not

MVC 4 razor Data Annotations ReadOnly

戏子无情 提交于 2019-12-22 04:28:10
问题 The ReadOnly attribute does not seem to be in MVC 4. The Editable(false) attribute does not work the way I would want it to. Is there something similar that works? If not then how can I make my own ReadOnly attribute that would work like this: public class aModel { [ReadOnly(true)] or just [ReadOnly] string aProperty {get; set;} } so I can put this: @Html.TextBoxFor(x=> x.aProperty) instead of this ( which does work ): @Html.TextBoxFor(x=> x.aProperty , new { @readonly="readonly"}) or this (

jQuery Mobile focus next input on keypress

眉间皱痕 提交于 2019-12-22 04:26:09
问题 I have a jquery mobile site with a html form consisting of 4 pin entry input boxes. I want the user to be able to enter a pin in each input field without having to press the iphone keyboards "next" button. I have tried the following and although it appears to set the focus to the second input and insert the value, the keyboard disappears so the user still has to activate the required input with a tap event. $('#txtPin1').keypress(function() { $('#txtPin1').bind('change', function(){ $("

Change value of flip toggle dynamically with jQuery Mobile

二次信任 提交于 2019-12-22 04:22:24
问题 I'm working with jQuery Mobile, and I save some settings in a cookie. When the settings page is reloaded, I read the cookie to set all the values. I'm having trouble setting the flip toggle switch. Most elements just have to trigger the keyup or changed events, but I'm not sure how the flip toggles gets its value from the select box. Any ideas? 回答1: After you change the value of the switch you have to refresh it for the animation to toggle: $('#Switch2').val('on').slider("refresh"); 回答2: It