jquery-mobile

Display documents using google doc viewer using iframe and jquery mobile dialog popup in Cordova 3.6

末鹿安然 提交于 2019-12-17 21:13:58
问题 I'm trying to display text documents inside google doc viewer which is inside an iframe which is then inside an jquery mobile dialog. I'm using cordova 3.6 and trying this on iOS. Here's my code so far: <div data-role="page" id="dialog"> <iframe id="myIframe" src="" style="width: 100%; height: 100%;" ></iframe> </div> <button href="foo.html" id="opener" data-rel="dialog" data-transition="pop">Open Dialog</button> the functions: <script> $(function () { $("#dialog").dialog({ autoOpen: false,

JQM (jQueryMobile) problem with AJAX content listview('refresh') not working

走远了吗. 提交于 2019-12-17 20:49:59
问题 This is a mock of what I'm doing: function loadPage(pn) { $('#'+pn).live('pagecreate',function(event, ui){ $('#'+pn+'-submit').click( function() { $.mobile.changePage({ url: 'page.php?parm=value', type: 'post', data: $('form#'+pn+'_form') },'slide',false,false); loadAjaxPages(pn); }); }); function loadAjaxPages(page) { // this returns the page I want, all is working $.ajax({ url: 'page.php?parm=value', type: 'POST', error : function (){ document.title='error'; }, success: function (data) { $(

jQuery mobile cloned form elements not working

ぃ、小莉子 提交于 2019-12-17 20:44:58
问题 I am cloning a form in jQuery mobile and the cloned form elements do not seem to work. IE the select lists do not change value, you cannot slide the range sliders. I'm trying to use the following code to clone a form and increment the name and id values on each instance of the cloned form. function newObservation() { var len = $('.observation').length; var titleLen = $('.observation').length + 2; var $html = $('.observationTemplate').clone(); $('.observationTitle:eq(0)').text("Observation - "

Jquery mobile listview - check initialization is complete

我与影子孤独终老i 提交于 2019-12-17 20:43:25
问题 I've coded my way into a corner. I need to call listview("refresh") on a list, however it may not have been initialized at the point I am calling the refresh method. Is there a way to check if the component has initialized or not? This is the error I get: cannot call methods on listview prior to initialization 回答1: When a listview widget is initialized, it's given the ui-listview class, so we can test for this class to see if it has been initialized: //select the listview var $myUL = $('#my

How to make Drop down panel in jQuery mobile 1.4.0?

偶尔善良 提交于 2019-12-17 20:32:36
问题 I have the following Panel in my jQuery mobile app , I want to make it to be drop down as appears in the following image rather than to be slide from the page edge . Is this can be done in jQuery mobile and How can i do this ? <div data-role="page" id="MainPage" > <div data-role="panel" id="Mainnavpanel" data-theme="b" data-display="overlay" data- position="right" data-position-fixed="true"> <ul data-role="listview"><li> <a href="#MainPageheader" data-rel="close" class="ui-btn" >Close</a></li

jQuery mobile button press event slow to process

南笙酒味 提交于 2019-12-17 20:28:51
问题 It seems like whenever I press an input button or anchor button on a mobile device, it takes a second or two to process the onclick or press event. Is there a way to speed this up? I am using Phonegap + jQuery Mobile on an Android device, it seems to be a little faster on iOS 回答1: Using Fast Buttons will eliminate 300ms of the delay. 回答2: From http://jquerymobile.com/demos/1.2.0/docs/pages/phonegap.html $.mobile.buttonMarkup.hoverDelay If you find that the button down/hover state (lists,

JQuery Mobile .page() function causes infinite loop?

荒凉一梦 提交于 2019-12-17 20:27:59
问题 I'm dynamically creating a listview with data from a AJAX response. It successfully creates the listview and populates it, but when i call JQM's .page() function on it, it seemingly goes into an infinite loop where the listview is appended forever. Is this a bug in JQM or am I doing something wrong? pageScript(function($context){ $context.bind("pagecreate", function(event, ui){ createMenu(); //function that deletes existing ul#menu and dynamically creates new one. $('ul#menu').page(); //here

How to make editable list item using jQuery?

六月ゝ 毕业季﹏ 提交于 2019-12-17 20:27:21
问题 I want to display user information in a listview with data pulled from a DB. Now my target is to make the listview editable so that when a user clicks on any listview, it responds like a "Textbox" and a keyboard appears (for mobile). After editing, the user can press a "save" button to save his/her editable contents to the DB. I am using HTML, jQuery, and CSS with the Adobe PhoneGap API. 回答1: I have created a fiddle and i think this is what you want : http://jsbin.com/ijexak/2/edit In fiddle

Chrome SecurityError loading jQuery Mobile page from local file system

扶醉桌前 提交于 2019-12-17 20:25:26
问题 I get the following error in Chrome when loading a trivially simple html file with a jQuery Mobile reference. The error is not present with just the jQuery reference. Uncaught SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL 'http://stacksnippets.net/js' cannot be created in a document with origin 'null'. <html> <head> <script src="https://code.jquery.com/jquery-2.1.4.js"></script> <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4

Change event not firing on select elements with Mobile Safari “form assistant”

 ̄綄美尐妖づ 提交于 2019-12-17 19:39:44
问题 I have dynamic select drop-down menus. For example, if you select a specific month, the 2nd select element will populate with number of days in that month. This works as intended, however when the user is on an iPhone and uses the "Next" button built into Mobile Safari's "form assistant", the change event (using jQuery) doesn't appear to fire and the 2nd select does not update. $('.month').change(function() { // update "days" select element }); FYI I'm also using jQuery mobile 回答1: You could