jquery-mobile

Navbar for all pages in a multipage HTML5 web app using a jQuery Mobile on client side

≡放荡痞女 提交于 2020-01-14 03:19:11
问题 I am using jQuery Mobile to create a WebApp. And I have a page like this : <div data-role="page" id="page1"> <div data-role="header"> <p> Page 1 </p> <div data-role="navbar"> <ul> <li><a href="#page1">To first</a></li> <li><a href="#page2">To second</a></li> </ul> </div> </div> </div> <div data-role="page" id="page2"> <div data-role="header"> <p> Page 2 </p> <div data-role="navbar"> <ul> <li><a href="#page1">To first</a></li> <li><a href="#page2">To second</a></li> </ul> </div> </div> </div>

Add class='myClass' to jQuery mobile generated input box in listview?

。_饼干妹妹 提交于 2020-01-13 21:06:57
问题 If you provide this code to jQuery Mobile with data-role="listview" and data-filter="true" . <ul maxlength="25" class="autocomplete ui-listview ui-listview-inset ui-corner-all ui-shadow" data-role="listview" data-inset="true" data-filter="true" data-filter-placeholder="" data-filter-theme="d"> </ul> It renders the following code: <ul maxlength= '25' class='autocomplete' data-role='listview' data-inset='true' data-filter='true' data-filter-placeholder='' data-filter-theme='d'> <form role=

Add class='myClass' to jQuery mobile generated input box in listview?

瘦欲@ 提交于 2020-01-13 21:05:14
问题 If you provide this code to jQuery Mobile with data-role="listview" and data-filter="true" . <ul maxlength="25" class="autocomplete ui-listview ui-listview-inset ui-corner-all ui-shadow" data-role="listview" data-inset="true" data-filter="true" data-filter-placeholder="" data-filter-theme="d"> </ul> It renders the following code: <ul maxlength= '25' class='autocomplete' data-role='listview' data-inset='true' data-filter='true' data-filter-placeholder='' data-filter-theme='d'> <form role=

For mobile devices how can I temporarily prevent jQuery touch events, then reactivate them?

橙三吉。 提交于 2020-01-13 19:12:28
问题 For mobile devices how can I temporarily prevent jQuery touch events on a page while I am waiting for a JSON response? For what it's worth I have jQuery-mobile also running. The JSON response will be used to create and update content on the page but there are other elements with event handlers that I'd like to disable (or stop users from activating them) until the JSON response has come back and I have done the necessary adjustments to the page content. With my limited experience I am

maps displayed wrong on mobile (using JQuery mobile)

﹥>﹥吖頭↗ 提交于 2020-01-13 12:50:09
问题 I'm using jQuery mobile and I have to display some maps. I'm using a function that create maps every time that I click on the specific link but after the generation of the first map, the others are displayed wrong. Here an example, First map: Other maps: I use a function like this: function buildMap(div){ var coord = new google.maps.LatLng(lat, lng); var options = { zoom: 13, scrollwheel: false, scaleControl: true, mapTypeControl: false, center: coord, mapTypeId: google.maps.MapTypeId.HYBRID

jQuery Mobile “pagebeforechange” being called twice

隐身守侯 提交于 2020-01-13 09:32:10
问题 I have the following listener set up for "pagebeforechange" (very similar to the jQuery Mobile Documentation's own code) and a link on the home page that is calling http://localhost/#product?id=255979 //Bind Listener for Product Details $(document).bind( "pagebeforechange", function( e, data ) { //Only Run If Site is Initialized if( ajaxSite.options.initialized ) { if ( typeof data.toPage === "string" ) { var u = $.mobile.path.parseUrl( data.toPage ), pl = /^#product/; if ( u.hash.search(pl)

how to change input type on selection with jquery mobile

白昼怎懂夜的黑 提交于 2020-01-13 07:27:31
问题 lets says I have this script (jquery mobile 1.3.2) <script> $( document ).bind( "pageinit", function( event, data ) { $("#ppreg").hide(); $("#smsreg").hide(); $(".group1").hide(); $(".group2").hide(); $(".group0").hide(); $('#selectcode').change(function() { var regtype = $("#selectcode option:selected").val(); if (regtype == "@") { $("#ppreg").show(); $("#smsreg").hide(); $(".group1").show(); $(".group2").hide(); $(".group0").show(); $("#UserName").setAttribute("type","tel"); } else { $("

Force iOS app opens external links in safari

╄→гoц情女王★ 提交于 2020-01-13 05:37:30
问题 I have an iOS app that I made using PhoneGap and JQuery mobile. The app has some external links that I want to open in mobile safari but as of now, they just open in the app view. The links are written like this : <a rel="external" href="wwww.example.com">Click Here</a> I read JQuery mobiles docs and it stated that adding rel="external" would solve this but apparently not. Any ideas? Keep in mind, this is a HTML base app. 回答1: Finally was able to do it by navigating to MainviewController.m

Force iOS app opens external links in safari

亡梦爱人 提交于 2020-01-13 05:37:12
问题 I have an iOS app that I made using PhoneGap and JQuery mobile. The app has some external links that I want to open in mobile safari but as of now, they just open in the app view. The links are written like this : <a rel="external" href="wwww.example.com">Click Here</a> I read JQuery mobiles docs and it stated that adding rel="external" would solve this but apparently not. Any ideas? Keep in mind, this is a HTML base app. 回答1: Finally was able to do it by navigating to MainviewController.m

JQuery Mobile: .val() not working

强颜欢笑 提交于 2020-01-13 04:55:07
问题 Greetings, I have the following jQuery Mobile code: <div data-role="content"> A confirmation code has been sent to your mobile phone via SMS <br><br> To proceed, please enter the 3-digit confirmation code below: <br> <input id="verifySMS_code" type="text" /><br> <a id="verifySMS_submit" href="#" data-role="button">Submit</a> </div> Here is my javascript: $(document).ready(function(){ $("#verifySMS_submit").live("click",function() { alert('hi'); var code=$('input#verifySMS_code').val(); alert