jquery-mobile

jquery mobile orientation detection

。_饼干妹妹 提交于 2020-01-04 06:39:26
问题 I am using jquery-mobile and it seems it doesn't detect the landscape setting. What I am using: iphone simulator Version 4.3 (238.2) from Xcode Version 4.1 Build 4B110 jquery mobile I tried to do this in my mobile.js $(window).bind('orientationchange resize', function(event){ alert(event.orientation) }) and turning the simulator around just keeps giving me an alert that says "portrait" when it clearly should be landscape. am i doing something wrong here? I also tried using media queries in

jquery mobile orientation detection

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-04 06:37:06
问题 I am using jquery-mobile and it seems it doesn't detect the landscape setting. What I am using: iphone simulator Version 4.3 (238.2) from Xcode Version 4.1 Build 4B110 jquery mobile I tried to do this in my mobile.js $(window).bind('orientationchange resize', function(event){ alert(event.orientation) }) and turning the simulator around just keeps giving me an alert that says "portrait" when it clearly should be landscape. am i doing something wrong here? I also tried using media queries in

jquery mobile and flot library

♀尐吖头ヾ 提交于 2020-01-04 06:26:27
问题 I am implementing flot in a small jquery mobile framework site. The page / content div that contains the flot is on a secondary page. The first time the flot page is shown, the chart renders nicely. Moving back to the primary page and forward again to the flot page, the chart does not render. The content is coming from an asp mvc view: <div id="chartcontainer"> <div id="chartdiv" style="height:300px;width:400px;"></div> </div> <script type="text/javascript"> $(function () { var d1 = [[1, 1],

Tell JQuery Mobile not to add classes?

烂漫一生 提交于 2020-01-04 05:43:10
问题 I have a Sharepoint application that we're using with mobile browsers. All I'm using from JQuery mobile are the touch event handlers. JQuery mobile adds classes to the dom to make web pages more mobile friendly, but it's wreaking havoc on Sharepoints automated CSS handling. Is there a way to tell JQuery Mobile not to mess with the DOM? 回答1: You could use just the jQM libraries you need as they have decoupled the widgets now: https://github.com/jquery/jquery-mobile/commit

jQuery Mobile 1.0.1 Google Maps doesn't show the map first time after Reload Refresh works

谁都会走 提交于 2020-01-04 05:41:08
问题 My problem is everytime i open the website; first time the map doesn't show up, after a reload/refersh it works and shows the map. Here is my google maps code: <script type="text/javascript"> var map; var infowindow; function initialize(position) { //var pyrmont = new google.maps.LatLng(48.195201,16.369547); var pyrmont = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); map = new google.maps.Map(document.getElementById('map'), { mapTypeId: google.maps.MapTypeId

Does jQuery's .data() cache persist across page transitions in jQuery mobile?

限于喜欢 提交于 2020-01-04 05:10:00
问题 I was just reading the jQuery .data() API reference. Beforehand, I speculated that it might work by assigning 'data-*' attributes to page elements; effectively a shortcut to $('#foo').attr('data-foobar', 'bar') . (1) Imagine it did work like this, though it seems it doesn't, and you switched from one jQuery Mobile page to another and then back again, would the 'data-*' attributes still be attached to the elements, or does jQM effectively reload from the downloaded HTML? In the reference,

Add image to collapsable content header

喜欢而已 提交于 2020-01-04 04:35:10
问题 I'm following the collapsible content doc at - http://jquerymobile.com/demos/1.0a4.1/docs/content/content-collapsible.html Is there a method of adding an image to the right, within the header field (in code below the header field is referenced by 'Test'). <div data-role="collapsible" data-collapsed="true"> <h3>Test</h3><add image here> </div> I can't seem to find anything in the docs. Thanks for any help 回答1: Live Example: http://jsfiddle.net/xMbyP/3/ Example #2: http://jsfiddle.net/xMbyP/4/

jQuery (mobile) not triggering .change event on Phonegap app

℡╲_俬逩灬. 提交于 2020-01-04 04:20:09
问题 (because 2 days I had no issues with this...) I have a multipage layout, in one of my pages I have a structure like so: <div id="view_offer" data-role="page"> <div data-role="header"> <h1>Edit Offer</h1> </div> <div data-role="content"> <p><label><input id="auto_renew" type="checkbox" name="checkbox-0">Auto renew?</label></p> </div> </div> With the following scripts (in this order) before I close the body tag: <script src="js/cordova-2.5.0.js"></script> <script src="js/jquery-1.8.2.min.js"><

jQuery Mobile header button float left and right

你离开我真会死。 提交于 2020-01-04 03:49:36
问题 i'm trying to get the header to have two sets of button on the left and right, but i'm having trouble getting everything to line up and float left/right properly. Any idea on an easy way to accomplish this. <div data-theme="a" data-role="header" data-position="fixed"> <!-- back button --> <a style=" margin:5px 0 10px 0;" data-role="button" data-transition="slide" data-theme="b" href="#track_dash" data-icon="arrow-l" data-iconpos="left"> Back </a> <!-- chart switch --> <div data-role=

Jquery Mobile: Getting a cancelled Postback that's causing a page load error

限于喜欢 提交于 2020-01-04 02:57:09
问题 So, I've been trying to get this page working for a couple of days now, when I clicked the send button it would work, but if you tried to hit enter it would just do a postback to the same page. Yesterday I thought I finally got it so it would work on chrome (it has been working just fine on firefox, but breaking on chrome/safari and it is an app for the iphone). But, even though I finally got it so it would change pages, it is now displaying an error. I narrowed down the cause to a postback