jquery-mobile

jQuery Mobile - listview() with data-filter=“true” and ajax content

浪尽此生 提交于 2019-12-13 05:17:57
问题 This is my html: <ul data-role="list-view" data-filter="true"></ul> My JS loads the ul with data and then I call listview(). $('#page').live('pagebeforecreate', function(){ // My Ajax code }); $('#page').live("pageinit", function(){ $('#page ul').listview(); }); That works except the search bar at the top doesn't appear. What am I missing? 回答1: You have data-role="list-view" When the right way is data-role="listview" that is why the search bar at the top doesn't appear. 回答2: I think you need

Jquery Mobile non-adjustable width

≡放荡痞女 提交于 2019-12-13 05:14:45
问题 Using asp.net <EditItemTemplate> my JQuery Mobile results are a fixed width and will not expand out with full browser, nor will they reduce small enough for mobile? I have removed all reference to width in all the controls? The controls render as mobile and the <ul> and <li> look fine. <ul data-role="listview" id="ul-edit-picks" data-divider-theme="a" data-inset="true"> <li>1st Week: <asp:TextBox ID="CHOICE1TextBox" runat="server" Text='1st Week' ReadOnly="True"></asp:TextBox><br /> <asp

jQuery Mobile panel not animating or closing

牧云@^-^@ 提交于 2019-12-13 05:12:49
问题 SOLUTION I was being an idiot and dynamically adding data-role="content" to the #wrapper element on page load, making it unrecognizable by JQM. I'm trying to implement a basic menu panel, but I'm having no luck getting it to animate or close. Below is the basic markup as generated by JQM. <div data-role="page" data-url="/" tabindex="0" class="ui-page ui-body-c ui-page-panel ui-page-active"> <div id="menu-panel" data-role="panel" data-position="left" data-display="reveal" data-dismissible=

JQuery for mobile safari: on() fails

我怕爱的太早我们不能终老 提交于 2019-12-13 05:12:43
问题 I'm trying to change some classes on dynamically generated DOM elements for a mobile web page. My usual method, the jquery on() doesn't pick up the events properly. Neither does "delegate()" , my backup work. I'm using JQuery version "http://code.jquery.com/jquery-1.7.min.js" 回答1: The solution was to add onclick='' to the div element. Not sure why that worked, but it did. – 回答2: Instead of using the on, can't you just write the event as it is? Such as: $(document).ready(function () { }); $

jQuery Mobile Phonegap Cordova Events not working and Firing

孤街浪徒 提交于 2019-12-13 05:04:47
问题 We have to build a mobile application using HTML5, to be worked on Android and IOS. We started by using jQuery Mobile Framework to manage the pages and actions.Every thing is fine. The problem is when we use the Apache Cordova API, to get some info from the device like the uuid, and manage an Exit Application Button, nothing working!... We use the Cordova Script which get from this Google Link. We put the line below into the config.xml file before building the app pn phonegap: <plugin name=

jQuery Moblie: passing parameters and dynamically load the content of a page

折月煮酒 提交于 2019-12-13 04:58:50
问题 I know it's a base problem, but I wasn't able to find anything fitting my situation. I have a jQuery Mobile page with a list of elements. The elements references to a second pages which has a content that depends on what element where choose (for example a list of articles and choosing an article it should show the relative text). Basically I have to pass a parameter between pages. I tried to do that using AJAX: $.ajax({ url : "index.html#page2", data : "id="+id, dataType : 'json' type: "GET"

Possible to ajax load only the <page/> instead of everything of an HTML document?

给你一囗甜甜゛ 提交于 2019-12-13 04:44:49
问题 I need to On page a, when clicking the link to page b, ajax injects the of b, not refreshing the whole page Now on page b, pressing a certain reload button refreshes the whole page, with some js being run The js must not be loaded more than once Method X) is the standard way, which satisfies 1,2 but not 3. Alert is seen after clicking the link to page b. a.html <before_page> <script>alert('abc')</script> </before_page> <page> <a href=b.html>b</a> </page> <after_page/> - b.html <before_page>

Get JSON data 404 (Not Found)

折月煮酒 提交于 2019-12-13 04:41:08
问题 OK this is strange. I am getting the following error when i try to test my code. For some reason, my URL address is showing as twice. GET http://howtodeployit.com/howtodeployit.com/api/get_recent_posts/ 404 (Not Found) JS: $(document).on('pagebeforeshow', '#blogposts', function() { //$.mobile.showPageLoadingMsg(); $.ajax({ url: "http:/howtodeployit.com/api/get_recent_posts/", dataType: "json", jsonpCallback: 'successCallback', async: true, beforeSend: function() { $.mobile.showPageLoadingMsg

JQuery Mobile's callback on 'navigate' not executing

爷,独闯天下 提交于 2019-12-13 04:39:01
问题 I'm having a simple html page, which registers a listener on navigate that's there from JQuery-Mobile. But I can't see the callback getting executed. The following is the html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> </head> <body>

How to formate dynamically table in jquery?

放肆的年华 提交于 2019-12-13 04:38:01
问题 can you please tell me how to create column with fixed Width in Table.I will explain my problem. I want to implement on dynamic table which is under div(create table inside a div having three column having width 10 % 20% 70%).Now my data is coming real time mean regular interval of time after one second . Now I want to show data on width 70%(real data).and on 10 % 20% I don't want to show any thing till now. Here I am implementing this .I make one div .On button click I start data regualar