jquery-mobile

JQuery Mobile slider not working

隐身守侯 提交于 2019-12-23 22:05:03
问题 I'm trying to get a slider to work in with JQuery Mobile 1.4.2. What I would like to do is to use the slidestop event to update a value elsewhere. However, the slidestop event does not fire. I created a test file and tested in Safari and Firefox. Nothing happens when I stop sliding the slider. Could someone please tell me what tutorial I missed? <html> <head> <link rel="stylesheet" type="text/css" href="css/jquery.mobile.css" /> <script src="js/jquery.min.js"> </script> <script src="js/jquery

How to refresh a button in a header with jQueryMobile?

孤人 提交于 2019-12-23 21:14:55
问题 I've been struggling to find a way to change a button in the header without losing the formatting. I want to change the Delete button with delete icon to a Done button with check icon. Here's a shortened version of the code: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script

jQuery Mobile - pageinit and pagecreate only firing once

假如想象 提交于 2019-12-23 20:52:45
问题 I am working on my first jQuery Mobile project and have encountered a roadblock. I am using Version 1.0 and so far the project is very simple, three pages with script only on the index. I incorrectly used $(document).ready(function() { ... }); at first and then read in the documentation that the correct thing to do is bind pageinit or pagecreate . Here is the script I am working with for testing purposes (straight off of the docs): $("#main").live('pageinit', function(event) { alert( 'This

How to stop jQuery Mobile calling $.mobile.loading('hide') during changePage?

北城以北 提交于 2019-12-23 19:13:14
问题 I'm trying to stop jQuery Mobile hiding the loading spinner when changePage is called. The program flow goes like this, starting with clicking a link, which has its click event defined like this: $('body').delegate('.library-link', 'click', function() { $.mobile.loading( 'show' ); $.mobile.changePage($('#page-library')); return false; }); Upon clicking the link, the pagebeforeshow event is fired, which triggers a function to populate the page from the local storage, or else make an ajax call

Why won't mailto include link parameters?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 17:38:17
问题 When this code runs the alert box comes up with the link that includes &list=groceries and &email=tim@sitebuilt.net. When the mailto: fires and brings up the email window those parameters are missing and I can't figure out why. the length of the string doesn't seem to matter. This code has all it needs to run. You can run it here: http://jsfiddle.net/mckennatim/rRerR/ <div data-role="header"> <h1>My Title</h1> </div><!-- /header --> <div data-role="content"> <h3>Add List</h3> <form> <div data

Why isn't my mobile website auto-resizing for mobile devices?

感情迁移 提交于 2019-12-23 17:35:06
问题 I've upgraded from jQuery Mobile a3 to b1, (Mainly because a3 didn't work with WP7 devices) and now it's not scaling correctly on any of my devices (iPhone 4, Droid X, HTC Surround - WP7). Any idea's as to what's causing this? I'm not using any custom css or anything else special... (I was previously, but I've since removed it all in attempt to find out what was causing the issue) It does re-size with chrome when I re-size the window. I've tried clearing the cache/cookies/history/everything

Javascript not working in second html file in Phonegap & jQuery Mobile

半世苍凉 提交于 2019-12-23 17:22:50
问题 I am working on an Phonegap jQuery mobile Android app. The app starts with the default index.html page and in it i am using $.mobile.changePage to load demo.html file. The demo.html gets loaded and displayed correctly but the javascript isn't working in it. I think i am messing up with the 'pageinit' event of jQuery Mobile or i don't know how to use it. Here is my code : This happens in index.html : $.mobile.changePage("demo.html", { transition: "slideup", reverse: false, changeHash: false })

different background images and left-panel bug

无人久伴 提交于 2019-12-23 16:15:49
问题 I'm using jQuery mobile 1.4 and if I click on the left panel, my background disappears. I solved this bug with help of Omar (thanks a lot). Aim: homePage should has a dark background all other pages should have a light background Problem 1: If I click on panel on homePage, it works. If I go to contactPage and click on panel, the background changes Problem 2: If I go to contactPage, open panel, close panel and go back to homePage - I can not open the panel JSFiddle: http://jsfiddle.net/ULuvu/1

How to use font awesome icons in jQuery mobile buttons

此生再无相见时 提交于 2019-12-23 15:35:35
问题 I'm trying to use jquery mobile with font awesome buttons, to do so, I followed the answer described in this post. However, when I try to use icons in my buttons, the class ui-icon-fa has display: inline-block and the button is not full width now. How can I fix this issue? 回答1: Instead of creating a bunch of classes as in the referred post, I would use the standard <i class="fa fa-camera-retro"></i> and just place it correctly with some CSS: <button class="ui-btn ui-btn-fa"><i class="fa fa

Why do elements loaded with $.ajax() exhibit no jQuery Mobile CSS?

☆樱花仙子☆ 提交于 2019-12-23 15:26:13
问题 I made a website in jQuery Mobile. I loaded some HTML content via the jQuery $.ajax() function. The code loaded contains such features as buttons and expand-able sections. However, none of the loaded elements exhibit mobile features. The jQuery Mobile CSS is not being applied to them. Does this have to do with how jQuery Mobile is already using Ajax to navigate around pages? The HTML content that was not loaded dynamically does retain the jQuery Mobile styles. 回答1: You need to refresh jQM