jquery-mobile

Changing jQuery Mobile date picker options

会有一股神秘感。 提交于 2019-12-13 01:45:59
问题 I am using the jQuery Mobile date picker control but I cannot change any of the properties. For example, the following code will attempt to set the first day of the week to Wednesday, in the document ready function but it doesn't work. <!DOCTYPE html> <html> <head> <title>Test</title> <link rel="stylesheet" href="jquery.mobile-1.0a4.1.min.css" /> <link rel="stylesheet" href="jquery.ui.datepicker.mobile.css" /> <script type="text/javascript" src="jquery-1.5.2.min.js"></script> <script type=

How JQUERY and JQM causing CORS error?

江枫思渺然 提交于 2019-12-13 01:43:38
问题 I have a HTML5 page without any Jquery that does not have any CORS error as below <!DOCTYPE html> <HTML> <button type="button" onClick="getBase64FromImageUrl()">Click Me!</button> <img id="preview1" crossorigin="anonymous" src="http://www.gravatar.com/avatar/0e39d18b89822d1d9871e0d1bc839d06?s=128&d=identicon&r=PG"> <script type="text/javascript"> function getBase64FromImageUrl() { var img = new Image(); img = document.getElementById("preview1"); var canvas = document.createElement("canvas");

Image gallery swiper not showing on jQueryMobile page

走远了吗. 提交于 2019-12-13 01:33:55
问题 I am using Swiper by idangero.us on my jQueryMobile page. My HTML-file consists of two "pages". One of them is supposed to have an image gallery. It works fine to view the images, and the slider is functional, without jQueryMobile. But as soon as I use jQueryMobile, the images are no longer showing up. The most similar problem I've found is this: Swiper not working in Jquery Mobile but it didn't help me find a solution. Can someone explain to me why this doesn't work? This is my HTML: <

Dynamic collapsible set content based on dynamic section in jQuery mobile

妖精的绣舞 提交于 2019-12-13 01:30:08
问题 I have a json it look like [ { "sid": "1", "webform_views_add_sublocation_form_tour_name": "4", "webform_views_add_sublocation_form_location": "location1", "webform_views_add_sublocation_form_sub_location": "sublocation1" }, { "sid": "2", "webform_views_add_sublocation_form_tour_name": "4", "webform_views_add_sublocation_form_location": "location2", "webform_views_add_sublocation_form_sub_location": "sublocation1" }, { "sid": "3", "webform_views_add_sublocation_form_tour_name": "4", "webform

How to bind to jquery-mobile pagebeforeload event?

放肆的年华 提交于 2019-12-13 01:19:57
问题 I'm getting desperate trying to get the jQuery mobile pagebeforeload event to fire. This just does nothing: $(document).on("pagebeforeload", function( e, data ) { console.log("hello"); }); According to the JQM docs, the syntax is correct. Still, nothing happens. Can anybody tell me why that is? 回答1: Make sure you're including preventDefault(); Otherwise, it'll just merrily continue loading. Docs: http://jquerymobile.com/demos/1.1.0/docs/api/events.html $( document ).bind( "pagebeforeload",

jQuery mobile $.mobile.changePage not working properly on iPhone in PhoneGap

╄→гoц情女王★ 提交于 2019-12-13 01:18:32
问题 I was having an annoying problem that had me stumped for about two days. I developed a PhoneGap application using jQuery mobile for the framework. I initially developed it on Android and all worked fine. Now, it's supposed to be cross-platform but when I brought it over to iPhone, it wouldn't get past the splash screen. I followed a few red herrings but eventually managed to zone in on the problem in JavaScript. It was a call to $.mobile.changePage early on in the program execution that was

jQuery click event on select option not working with jQuery Mobile framework

时光毁灭记忆、已成空白 提交于 2019-12-13 01:17:19
问题 I'm trying to fire a click event on my select options. This is working fine in FF/Safari if the selectlist is a normal multiselect box like this: http://jsfiddle.net/YZUBs/47/ However, if i include the jQuery Mobile framework, the click event does not trigger anymore: http://jsfiddle.net/YZUBs/48/ Anyone? 回答1: The click event on <option> isn't standard and thus not supported in all browsers. You should use the onchange event instead of onclick . You can read all the Q&A in this search, this

Google access_token is undefined

会有一股神秘感。 提交于 2019-12-13 00:52:06
问题 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

Is it possible to use a single jQuery mobile widget within a non-mobile web page?

試著忘記壹切 提交于 2019-12-13 00:36:43
问题 I am using jQuery UI to put some widgets on a web page primarily designed for large screens. I was looking for a flipswitch widget, and I found one provided by jQuery mobile framework. Is it possible to use jQuery mobile to just make this flipswitch widget work, without the whole jQuery mobile theming ? 回答1: You can use jQuery Mobile's widgets by creating a custom build. All you have to do is to choose the widgets you want, and then load JS library as well as style sheets in head. You will

Jquery Idle timer active not firing

随声附和 提交于 2019-12-12 23:25:48
问题 I'm using JQuery idle-time plugin to automatically logs out a user after x mins of idle time. But this idle/active time should be updated in the server as well. So trying to do an Ajax hit to the server inside the active.idleTimer function. <script type="text/javascript"> (function ($) { var timeout = 1800000; $(document).bind("idle.idleTimer", function () { window.location.href = "MyLOGOUT_URL"; }); $(document).bind("active.idleTimer", function () { $.ajax({ type: "POST", url : "My_URL" });