jquery-mobile

jQuery more than once function called

让人想犯罪 __ 提交于 2019-12-12 02:55:14
问题 I am creating an mobile app and I am calling the function getItem passing data-trnote val. function getTitles() { $(document).ready(function(e){ var list = $('#recent'), items = []; $.mobile.notesdb.transaction(function(t) { t.executeSql('SELECT buildingcode, buildingaddress FROM buildings ORDER BY buildingaddress ASC', [], function(t, result) { var i, len = result.rows.length, row; if (len > 0 ) { for (i = 0; i < len; i += 1) { row = result.rows.item(i); items.push('<li><a href="#display"

JQuery Validator turn OFF tooltips on all form fields

a 夏天 提交于 2019-12-12 02:54:25
问题 This one is strange. So i've implemented the jQuery Validation on a site where I am using both Backbone.js and jQuery Mobile. On one form the validation works pretty much like the default where you see red text under the input fields (i had to change the placement so the text was not inside the field). On another page for some reason the error messages don't show up the same way. They show up looking like a tooltip. I've seen many posts on here for how to make the validation use Tooltips,

JQuery mobile, is there a way to prevent the SELECT box from becoming a dialog page?

邮差的信 提交于 2019-12-12 02:48:25
问题 SO I have a select box that I fill dynamically. I discovered that once the SELECT gets longer than the page, it automatically becomes a dialog listview.... which is TERRIBLE! When this happens, the page refreshes when the dialog is closed and my whole page starts over.... Has anyone experienced that and do you know how to shut it off? Thanks! Todd 回答1: You could use the native look and feel? http://jquerymobile.com/demos/1.0.1/docs/forms/forms-all-native.html Native form elements & buttons

how to reduce the height of panel in jQuery mobile

痞子三分冷 提交于 2019-12-12 02:47:12
问题 I make a panel in jQm .I want to reduce the height of panel .I added height property with important but it not work .I also google it did not find any solution can you please tell me how to reduce the height of panel .? here is fiddle http://jsfiddle.net/7Cmb3/8/ #mypanel{ height:100px !important } Thanks 回答1: In JQM panel the min-height is 100%. So Try like the following in your style sheet. .ui-panel{ min-height:100px !important; max-height: 100px !important; min-width:100px !important; max

jquery mobile multipage in separate html files

孤街浪徒 提交于 2019-12-12 02:47:10
问题 I have a Jquery Mobile multipage with different pages <title>TEST</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script> <link

HTML with JavaScript Form validation and JQuery Mobile

对着背影说爱祢 提交于 2019-12-12 02:45:52
问题 In a HTML form I am using JavaScript Form validation to avoid empty fields. This is the code for the form: <form method="post" name="form1" onsubmit="return validateForm()" action="<?php echo $editFormAction; ?>"> <table align="center"> <tr valign="baseline"> <td nowrap align="right">Nickname:</td> <td> <input type="text" name="nickname" value="" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Email:</td> <td><input type="text" name="email" value="" size="32"></td> </tr

Slider not working in jQuery Mobile

狂风中的少年 提交于 2019-12-12 02:45:47
问题 I'm trying the slider widget in jQuery Mobile, and just copied the code from the docs: <div data-role="fieldcontain"> <label for="slider">Input slider:</label> <input type="range" name="slider" id="slider" value="0" min="0" max="100"/> </div> But this doesn't work as expected at all. When I drag the slider in Safari the numbers change almost randomly. They increase from 0 to 9 and then at the far right of the slider it goes back to 0, and then when I slide back it goes back and forth between

Post form to an API with javascript and jquery

巧了我就是萌 提交于 2019-12-12 02:34:46
问题 Im not good with forms. How do you send a post form from an underscore.js template to an express.js API with javascript? I try with the .submit() but it doesnt work. Im using jQueryMObile so the form is inside a data-role page. The route on server: app.put('/users/:userId/spot/:spotId/add', spot.addUserSpot); The form: <form id="follow" method="put"> <input type="hidden" id="spot" value="<%= this.model._id %>"> <input type="hidden" id="user" value="<%= user %>"> <input type="submit" id=

Icon only back button jQuery Mobile

只愿长相守 提交于 2019-12-12 02:27:56
问题 Within my jQuery Mobile page I programmatically set up my back button to appear on every page that is not the first page by using the following code <div data-role="page" data-add-back-btn="true" id="anid"> what this does is create a back button that have text in it saying back. however I do not want that I want the icon only. How can this be done in jQuery Mobile 回答1: Working example: http://jsfiddle.net/Gajotres/ygmWD/ $(document).on('pagebeforeshow', function () { $.mobile.activePage.find(

How to enable a jQuery Mobile button?

强颜欢笑 提交于 2019-12-12 02:26:40
问题 I'm using jQuery 1.6, and jQuery Mobile Beta 1. I have a jQuery Mobile themed button which I initialize as disabled. During a certain event, I'd like to enable the button. The following code is what I'd expect to work: $("#id").prop("disabled", false); But it seems like this doesn't propagate up to the jQuery Mobile wrapping DOM elements. 回答1: The solution, per the jQuery Mobile docs page Form Plugins Method is as follows: $('#id').button('enable'); 来源: https://stackoverflow.com/questions