天道酬勤,学无止境

jquery-mobile

Have a select menu select a value in another select menu with Jquery Mobile [duplicate]

Question This question already has an answer here: How can I programmatically change a select box selection from within the control's own change event and have it work in mobile browsers (1 answer) Closed 4 years ago. I am trying to have a priority level dropdown menu change a value of another dropdown menu dynamically when the user selects an option. I am using Jquery Mobile and not sure how I would go about making this happen. Here is my HTML currently. So if I choose priority level Normal I would like it so select 48 Hours in the commETA and compETA select boxes. Thanks in advance for any

2022-05-17 04:23:08    分类:技术分享    jquery   jquery-mobile

Mousedown Event with ipad/iphone Compatibility? - jQuery Mobile

Question I wrote a small scroller in jquery. The scroller seems to work perfectly on PC and Macs. However it doesn't work on touch devices. I guess this is due to mousedown property being called. how do I make this work on both PC and touch screen devices? Thanks $('.scroll-nav-up, .scroll-nav-down').live('click', function(){ $('.scroller-wrap').stop(); return false; }); $('.scroll-nav-up').live('mousedown', function(){ $(this).closest('.item').find('.scroller-wrap').animate({ top: -($(this).closest('.item').find('.scroller-wrap').height() - 250) }, 800); }); $('.scroll-nav-down').live(

2022-05-17 03:49:21    分类:技术分享    jquery   jquery-mobile

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

Question 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 type="checkbox" name="checkbox-3a" id="checkbox-3a" class="custom"> <label for="checkbox-3a"

2022-05-15 19:06:10    分类:技术分享    javascript   jquery   html   jquery-mobile   mobile

Google access_token is undefined

Question I am developing a mobile web application which will access the Google Books API and allow the user to add books to their "favorites" book shelf. Its my first time using an API that requires the Google authorization. I need to send an authorized request to modify private user data. I (think) I have have the proper access_token but I can't figure out how to get to it. I am using the Google sign in button like so: ` <div class="g-signin2" data-onsuccess="onSignIn"></div> ` I also have this to identify my application to Google: `<meta name="google-signin-client_id" content="12345.apps

2022-05-12 08:52:38    分类:技术分享    javascript   jquery-mobile   google-books

Is the jQuery mobile the best UI framework to integrate with PhoneGap? Or should I use Ionic? [closed]

Question Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago. Improve this question I wanna to use PhoneGap to starting an enterprise application, but don't know which of all the mobile UI frameworks is the best to integrate with the project? i'm new to PhoneGap. Answer1 If you want to choose between jQuery Mobile and Ionic Framework I would advise you to pick Ionic. This will, of course, depend on your knowledge and preferences

2022-05-11 14:55:19    分类:技术分享    cordova   jquery-mobile   ionic-framework

How to get value of radio buttons from one html page to another?

Question I try to get the value of the at the bottom pasted html code who stands on the first html page. I have another html page, which should be generated with the button "onclick". More precisely the code should create buttons in the next page. Case1: radio-choice-1 is selected - it should create 4 buttons. Case2: radio-choice-2 is selected - it should create 4 or 9 buttons. Case3: radio-choice-3 is selected - it should create 9 or 16 buttons. Case4: radio-choice-4 is selected - it should create 16 buttons. I dont know how to get the value of the selected radio buttons then generate buttons

2022-05-08 22:42:08    分类:技术分享    javascript   jquery   html   jquery-mobile   web-applications

IBM Workligt Single HTML file containing all application pages: How to load new page?

Question Im developing a hypbrid app using IBM Workligth, with a single html file containing all application pages, like: <div data-role="page" id="page1"> //page1 specific </div> <div data-role="page" id="page2"> //page2 specific </div> How do I switch between the pages? It seems like this should be really simple, but I can't find out how. Thanks in advance. Answer1 You should probably also mention that you are using jQuery Mobile (data-role attribute in your HTML tags...), because that's the key to your question. jQuery Mobile provides the ability to create multi-page applications. There are

2022-05-08 09:44:25    分类:技术分享    html   jquery-mobile   ibm-mobilefirst

When should I use PHP Session vs Browser Local Storage vs JavaScript Object Parameters?

Question When is it appropriate to use the many different ways that modern day AJAX based applications are storing data? I'm hoping for some specific guidelines that I can give developers. Here's what I'm seeing so far, and it's getting messy. PHP Server Side Session: PHP Session data is probably the oldest way to store session based information. I'm often passing in parameters through various AJAX calls from JavaScript/jQuery objects - to store in PHP Session. I'm also returning objects of data (some session information) back through as a response/result to JavaScript/jQuery methods. Browser

2022-05-08 07:13:09    分类:技术分享    javascript   php   session   jquery-mobile   javascript-objects

Preventing Jquery Mobile from processing URL hash?

Question I'm using Jquery Mobile in an existing web application. The problem is, Jquery Mobile is processing all URL hashes. For example: mysite.com/#foo Here, the hash 'foo' is being sent to Jquery Mobile, and it is processing it, instead of letting my non-jquery mobile code process it. Is it possible to prevent Jquery Mobile from interfering with the url hash? Answer1 The default behavior of jQuery Mobile is listening to hashchange event and updates URL hash in order to handle history of pages, only when Ajax is enabled. To handle pages linking, both changeHash and hashListeningEnabled

2022-05-08 06:13:47    分类:技术分享    javascript   jquery   jquery-mobile

jquery mobile - change flip switch default state

Question I'm using jQuery mobile's flip switch and by default the switches are off. I can't figure out how to set the default value to 'ON' <form id="sound-switch"> <select name="flip-3" id="snd-switch" data-role="flipswitch" data-mini="true"> <option value="off">Off</option> <option value="on">On</option> </select> </form> I read somewhere to add value="on" to the html but I can't get it to work. Does anyone have any experience with this? Answer1 Use .val() to set the Flipswitch's value and then re-enhance it .flipswitch("refresh"). $("#snd-switch").val("on").flipswitch("refresh"); Demo

2022-05-07 09:26:09    分类:技术分享    jquery   jquery-mobile   flip   jquery-mobile-flipswitch