jquery-mobile

store ID from listview in localStorage

不羁岁月 提交于 2019-12-13 20:23:14
问题 I've a listview created by a loop: for(var i = 0; i < data.length; i++) { var garage = data[i]; $("#content-p").append( "<ul data-role=\"listview\">" + "<li><a href=\"#\" id=\"submitID\" >" + "<h2>"+garage.location+"</h2>" + "<p><b>"+garage.description+"</b></p>" + "<p>"+garage.address+"</p>" + "</a></li>" + "</ul><br>" ); $("#submitID").click(function() { localStorage.setItem("garageID",garage.ID); $.mobile.changePage("#resP"); }); } Now the user can click on a listview item and the ID from

jquery mobile multi html go back to first page

徘徊边缘 提交于 2019-12-13 20:02:39
问题 I'm initializing my application with the code below: $(document).on("mobileinit", function() { $.extend($.mobile, { hashListeningEnabled: true, pushStateEnabled: true }); $.mobile.autoInitializePage = false; var userApplicationContext = loadPreference("userApplicationContext"); $(function() { $("body").load(userApplicationContext == null ? "app_options.html [data-role=page]" : "home.html [data-role=page]", function(data) { $.mobile.initializePage(); }); }); }); So there are different apps to

How to pass values from one page to another in jquerymobile? [duplicate]

此生再无相见时 提交于 2019-12-13 19:52:04
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: jQuery mobile passing parameter from one page to another I need to pass values from one page html to another html page. what is the best way to pass the value. can anyone explain me how to achieve this. 回答1: you can pass the variables through forms, urls and session. You can use all the methods you use in existing web applications to pass data from 1 page to another. or you can utilize the local storage of HTML5

Block the pop out of default keyboard on mobile devices

泄露秘密 提交于 2019-12-13 19:26:44
问题 How to disable or block the default keyboard when we focusing on the input textfield or textarea etc.? I have already tried: blur(), readonly. For the initial input tag. It is ok with that but the bug is users cannot select the text afterward. Using div-contenteditable="true" to replace input html. However, still pop up default keyboard. I already have my virtual keyboard, wanna find a way to disable the default one so not to cover my virtual on mobile devices. 来源: https://stackoverflow.com

Using Handlerbars with Yahoo Pipes

荒凉一梦 提交于 2019-12-13 19:15:30
问题 I'm trying to pull JSON feeds from a yahoo pipes source into my jQuery Mobile project using Handlebars.js with jQuery's ajax method. This method works without Handlebars, but there are some limitations. It doesn't show up in jquerymobile listview format, instead it pops out like a normal bullet list. Here's the source: var pipeURL = "http://pipes.yahoo.com/pipes/pipe.run?_id=mu3NkfY_3BGtncSIJhOy0Q&_render=json"; $.ajax({ url : pipeURL, dataType : "json", success : function(data) { console.log

Reference Error: Can't find variable: ChildBrowser, Cordova 1.7.0, jQueryMobile 1.0.1, iOS 5.1

本小妞迷上赌 提交于 2019-12-13 17:43:49
问题 I'm working on my first PhoneGap/Cordova app and using jQueryMobile as well. I'm trying to get the ChildBrowser plugin working but getting the error in the title when trying to call ChildBrowser.install() Its in my onDeviceReady function which is being called correctly and I've even verified that the ChildBrowser.js file is being called by adding an alert and wrapping the anonymous function that file in a try/catch and it does not seem to be throwing any errors during its execution. However

.removeClass() working on jsFiddle but not in the browser

∥☆過路亽.° 提交于 2019-12-13 17:28:23
问题 Im using jquery mobile and trying to remove some classes instead of writing up a bunch css. When I test it in jsFiddle it works fine but not when I view it in the browser. Ive put the script inside the data-role="page" so it should of loaded correctly. Ive also tried .trigger("updatelayout"); but that did not seem to work. Any help would be much appreciated since this should have been a 2 minute task turn into 2 hour headache. jquery: $("#panelforminput div").removeClass("ui-shadow-inset ui

Disable page transition on data-role=“header” at jQuery Mobile [closed]

拟墨画扇 提交于 2019-12-13 16:48:51
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . Is it possible to disable page transition on data-role="header"? The goal would be to use page transition only at data-role="content". 回答1: Yes you can do this by making all your headers fixed and adding the same

Android Phonegap application can't connect to internet

天大地大妈咪最大 提交于 2019-12-13 16:41:52
问题 I made a simple android application in phone gap,jQuery mobile, HTML5 with a simple getJSON data encoding . The application working well in Browser . But not in android . When googled I found that android cant connect to internet . So that I added the following <uses-permission android:name="android.permission.INTERNET" /> But Still my application doesn't getting jSON data .. In browser its working well my js file looks like function getMovies(){ var serviceURL = "http://myserver.com/"; alert

jQuery mobile- How to change the icon of select to a custom icon?

有些话、适合烂在心里 提交于 2019-12-13 16:29:26
问题 I have to change the select icon in <select> to a fa icon. The code I use: <select class="sortBy" name="sortBy" data-url="${url}" data-icon="ui-icon-arrow-sort"> <option value="">Sort By</option> <option value="new" selected="selected">Newest</option> <option value="old">Oldest</option> </select> The CSS is: .ui-icon-arrow-sort{ content: "\f0dd"; display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased;