jquery-mobile

jquery mobile does not render list after jquery template was inserted

ぐ巨炮叔叔 提交于 2019-12-21 21:59:37
问题 I am adding tags using jquery templates to jquery Mobile website. It adds li tags, however it does not style in the standard jqueryMobile style. I can see it visually and by inspecting DOM: jquery mobile adds classes and convert to div and span classes, where in my case I see plane ul and li tags without any jquery mobile classes. I have a version, that it loads first Jquery Mobile, and then injects jquery template and Mobile does not refresh that list and doesnt style it. Is there a way to

Jquery mobile 1.4 on iOS the fixed elements on bottom of page hide input text onfocus

孤街醉人 提交于 2019-12-21 21:43:34
问题 Hi there I am building cordova 3 app with Jquery mobile 1.4 Safari, and Chrome on my mac have no issues with the following, but when I deploy on the real device, or iOS simulator and want to type in the fields I get the bottom fixed elements of the page moving up and overlapping the input elements. The cursor is blinking in the right position, where the input field is, but the slider of the footer is hiding it. To make it simple my page looks like that: [header fixed] div with input text div

Load External Panel To Jquery Mobile Page

大兔子大兔子 提交于 2019-12-21 20:56:27
问题 JQuery Mobile template which utilises a side panel. For simplicity I want to be able to load this panel from an 'external page' / seperate document so that it can be built once and used on many pages. A bit of research has resulted in me getting the following code to load a string of html into a variable and then loading that variable into each page as the side panel: /* Get the sidebar-panel as a var */ var side_var = '<div data-role="panel" id="left-panel" data-position="left" data-display=

jQuery Mobile Beta: can no longer use $('[data-role=header]')?

浪子不回头ぞ 提交于 2019-12-21 20:24:25
问题 I used to be able to get hold of $('[data-role=header]').first().height() in alpha with jQuery 1.5.2, but no longer can in beta with jQuery 1.6.1. Has something changed? Full code - this writes 0 to console.log... <!DOCTYPE html> <html> <head> <title>Page Title</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" /> <script type="text

iFrame in JQuery Mobile not showing

岁酱吖の 提交于 2019-12-21 20:17:09
问题 I have added an iframe to a JQuery Mobile page: The link to it: <a href="#testit" data-icon="search" rel="external">Got to iFrame Page</a> <!--test iframe page--> <div data-role="page" id="testit"> <div data-role="header"> <h1>Page Title</h1> </div><!-- /header --> <div data-role="content"> <iframe src="http://www.google.com" width="100%" height="100%"> <p>Your browser does not support iframes.</p> </iframe> </div><!-- /content --> <div data-role="footer"> <h4>Page Footer</h4> </div><!--

iFrame in JQuery Mobile not showing

我与影子孤独终老i 提交于 2019-12-21 20:16:10
问题 I have added an iframe to a JQuery Mobile page: The link to it: <a href="#testit" data-icon="search" rel="external">Got to iFrame Page</a> <!--test iframe page--> <div data-role="page" id="testit"> <div data-role="header"> <h1>Page Title</h1> </div><!-- /header --> <div data-role="content"> <iframe src="http://www.google.com" width="100%" height="100%"> <p>Your browser does not support iframes.</p> </iframe> </div><!-- /content --> <div data-role="footer"> <h4>Page Footer</h4> </div><!--

jQuery Mobile events - standalone?

╄→гoц情女王★ 提交于 2019-12-21 20:07:49
问题 I'm trying to get the jQuery Mobile events(https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.event.js) to work as a standalone "plugin" but I can't seem to figure out what I need to change. I know this is possible because I used this: https://gist.github.com/743400 in the past and it worked... that file is based on beta or even alpha release of JQM and I would like to use the latest... any ideas? 回答1: Update You can now build a custom package for jQuery mobile 1.2 http:/

The “checked” attribute of checkbox does not get enabled if the html is created dynamically

安稳与你 提交于 2019-12-21 18:32:19
问题 I have created a listview containing checkbox. On few of the list items I wanted the checkbox to be checked. The listview is created dynamically as the content comes from the server. I have the following jsfiddle code. http://jsfiddle.net/praleedsuvarna/rN28z/ Can you please help me solve this problem? Thanks in advance below is an example of my dynamic list content where the 2nd and 3rd checkbox is set to "checked" $(document).on('pageshow', '#index', function(){ var list = '<li>'+ ' <div

Best practice using BIND or ON functions in jQuery [duplicate]

帅比萌擦擦* 提交于 2019-12-21 17:58:09
问题 This question already has answers here : What's the difference between `on` and `live` or `bind`? (7 answers) Closed 6 years ago . Recently the jQuery team start recommending to use on instead of bind for binding events to the DOM. I would like to know if there is a difference between them, what is the benefit of using the on function and if it would be a good call of changing all my bind 's to on 's functions in my code? 回答1: The jQuery project is moving towards putting more and more

Jquery Mobile code for Flickering Navigation with PhoneGap

假如想象 提交于 2019-12-21 17:04:36
问题 I believe this post is the resolution to my trouble Flickering when navigating between pages . Specifically: $(document).bind("mobileinit", function() { if (navigator.userAgent.indexOf("Android") != -1) { $.mobile.defaultPageTransition = 'none'; $.mobile.defaultDialogTransition = 'none'; } }); I am coming from the C# world and pretty much clueless as to jQuery mobile. I would like to add this snippet but not sure where. If it matters I think that I would add it to jquery.mobile-1.1.0.rc.1.js