jquery-mobile

Jquery Mobile: updating a form more than once

こ雲淡風輕ζ 提交于 2019-12-19 11:27:44
问题 OK, after many hours of confusion I have discovered that calling page() on Jquery Mobile elements only works once. What do I do if I want to update a form multiple times via AJAX? 回答1: update jQuery Mobile beta2 introduces a create event. .trigger('create') applies JQM enhancements to an element and its children. See: http://jquerymobiledictionary.pl/faq.html You have to use it only once for an element. No exceptions yet. if $('#container') is your element, and you replace its content with

how to display jquery page(inside a div) using javascript?

故事扮演 提交于 2019-12-19 10:46:51
问题 here is my problem, i call this method and what it does is post some data on server using jQuery, i want to display page using result i recieve from server my page index.html <div data-role="page" id="login"> // other page content <div id="divrightButton"> <!-- calling loginSubmit which calls loginPostData--> <a class="bluebutton" href="#" onclick="loginSubmit(); return false;">Login</a> </div> </form> </div> <!--main page--> <div data-role="page" id="mainMenu"> Main menu </div> here is the

How do I restrict a collapsible item to stay expanded unless i click the other collapsible items to expand but not the collapsible item itself

感情迁移 提交于 2019-12-19 10:36:11
问题 I am working on a mobile website and using jquerymobile. I have 4 collapsible items in an accordion. I want to have one of the items to stay expanded. If i click the expanded item, it is collapsed (i do not want to collapse this item). If i click any other collapsed item, the last expanded item is collapsed (thats ok). I will appreciate your help. The dynamic javascript code for accordion categories is given bellow: function create-accordion(categories) { category_array = categories; jQuery

List view css not rendering jquery mobile

半世苍凉 提交于 2019-12-19 10:21:21
问题 I am making an application using jquery mobile, phone gap and backbone.js. In this I am dynamically creating pages and appending it to the body element of the html page. I am also dynamically creating a list view for a particular page. However the list view just shows plain links for the li tags. The code for my view is below directory.views.UserListPage = Backbone.View.extend({ initialize: function() { this.template = _.template(directory.utils.templateLoader.get('user-list-page')); },

JQuery-Mobile Page transitions - flickering (separate pages)

给你一囗甜甜゛ 提交于 2019-12-19 09:57:15
问题 I spend the day figuring out how to fix the flickering between page transitions in JQuery-Mobile 1.3.1. I found that .ui-page { -webkit-backface-visibility: hidden; } or setting the data-transition to none or removing meta.attr( "content", disabledZoom ); and meta.attr( "content", enabledZoom ); from JQM file helped. But apparently that is only working if the webapp is just one "multi-page". I am using 4 separate pages. In iOS (mobile Safari) and on PC (Browser: Chrome) I don't have any

Removing unused jQuery Mobile elements?

爷,独闯天下 提交于 2019-12-19 09:26:23
问题 I'm using jQuery Mobile beta. It's great fun to work with, but it's still very slow on a 3G connection. It requires the following files: http://code.jquery.com/jquery-1.6.1.min.js (89KB) http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js (65KB) http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css (41KB) These are all above the 25KB iPhone cache limit, and even with a cache-manifest, mean that the site is pretty slow to render first time around. Not unusably slow, but

jQuery Mobile page jumping to top when a collapsible is clicked

你。 提交于 2019-12-19 08:54:16
问题 I have a jQuery Mobile page with a panel navigation. The last two elements are collapsibles with further menu items. Expanding or collapsing these causes the page to jump to the top and the user has to scroll down again to choose one of the revealed entries. I tried to surpress this behaviour by executing .preventDefault() in the click event of the collapsible div, but the page still jumps to the top. Does anyone know how to prevent this? Thanks in advance. My HTML: <div data-role="panel" id=

PhoneGap / JQuery Mobile - Page style breaking when keyboard is visible

北城余情 提交于 2019-12-19 08:41:49
问题 I have an application built with Phonegap and JQuery Mobile. Whenever the soft keyboard shows - on form inputs etc - the whole page resizes. Images, buttons and text. Which I'm assuming is something breaking the CSS? Anyone else had this problem, or know why it might be occurring? I'm having to restart the application to reset the layout. Any ideas appreciated! Thanks! 回答1: I found the answers here: http://solutions.michaelbrooks.ca/2011/07/05/android-soft-keyboard-resizes-web-view/ http:/

How to prevent jQuery mobile's automatic page styling?

旧时模样 提交于 2019-12-19 07:26:09
问题 jQuery mobile automatically adds classes to all elements on my page on loading... this really messes up the jQuery UI widgets I have on the page. Is there any way to prevent jQuery mobile from automatically adding classes to my HTML elements? I only wan't some of the jQuery mobile widgets on my page, and I want to specify them explicitly. 回答1: You can ask jquery mobile not to touch your widget by putting the attribute below: data-role="none" 来源: https://stackoverflow.com/questions/8959519/how

Scroll position of a jquerymobile collapsible set when expanded

允我心安 提交于 2019-12-19 07:18:44
问题 I am using a jQueryMobile (v1.4.0) collapsible set / accordions to display a list of elements and its content as shown in this jsFiddle. <div id="List" data-role="collapsible-set"> <div data-role="collapsible" data-content-theme="c"> <h3>Lorem ipsum 1</h3> <p>Suspendisse neque...</p> </div> <div data-role="collapsible" data-content-theme="c"> <h3>Lorem ipsum 2</h3> <p>Lorem ipsum...</p> </div> </div> The problem I have is with scrolling when the content of an item is longer than the length of