jquery-mobile

How to detect html elements on touchmove

送分小仙女□ 提交于 2019-12-13 07:14:46
问题 I've a series of list items. On an iphone (touch device), as a user touches and moves his finger across the screen, I want to capture all the html li elements that he has touched. So how do I get that? Say I want to get all the ids of those elements and alert is when the touch ends. I tried with jQuery Mobile with "swipe' event but only the first one to be touched, that too if the 'touch' starts from that particular element shows up. 回答1: Not sure if this will work on a mobile device unless

Horizontal align the thumbnail in a jQuery mobile listview

老子叫甜甜 提交于 2019-12-13 07:11:07
问题 I'm new working with listviews in jQuery mobile. The CSS code i'm using to override the default used with jQuery mobile is: <style type="text/css"> .has-odd-thumb li a { padding-left: 90px !important; padding-top: 0px; padding-bottom: 0px; } .thumbContainer { position: absolute; left: 0; top: 0; bottom: 0; width: 80px; height: 80px; overflow: hidden; } .thumbContainer img { display: block; margin: auto; max-height: 80px; } </style> This is to make my non-squared images fit correctly when they

Link Click Delay in jQuery mobile 1.4.0

北城余情 提交于 2019-12-13 06:44:17
问题 In my jQuery mobile app , I have 3 pages each one is in a separate Html file Home Page -->Page1 contains Form To submit --> Page 2 , when I click the Page1 link from home Page it takes 4-5 seconds after clicking it to open and show Page1 . In Page2 I have a code for controlling the mobile device back button so when user click the device back button at page2 the app back to the home page directly without passing throw the Form Page "Page1", after back to the home Page if i click on Page1 link

Dynamically adding a page in jQuery Mobile not working

你离开我真会死。 提交于 2019-12-13 06:08:25
问题 When I create a whole new page in jQuery Mobile the page gets created, but when I click the link with the id linking to the just created page, it does not work. The list item link stays selected (blue, in the standard theme), but the page itself does not load. The page gets created by appending it to the body: $('body').append('<div id="' generatedId '" data-role="page"><div data-role="header"><h2>Page</h2></div><div data-role="content">content</div></div>'); When I turn off jQuery Mobile you

jQuery Mobile popups not always working

南楼画角 提交于 2019-12-13 06:06:02
问题 uhere I upload a site for testing. When open it click albo than click on the two firsts names to see the popup in action (only on the two firsts because them are the only that are set), than go to stats and scroll and click on the two blue names (same speech as before, only these ), and everything works fine. Now try to navigate through the site/pages and you can see that not always the popups work! I tried some times and everything works only if you follow the pages in this order: albo -

jQuery mobile 1.2.0 Alpha 1 autodividersSelector

孤街浪徒 提交于 2019-12-13 06:00:59
问题 I'm trying to divide a jQuery mobile list depending on an attribute in each li element. $("#mylistview").listview({ autodividers: true, autodividersSelector: function ( li ) { var out = $('li').attr('attr_name'); return out; } }); But it creates the list divider only for the 1st list item attribute. I'm using listview(refresh) each time I insert a new li. What I don't understand is if I need to call the function I pasted here before creating the list, after or for each element. I think I've

How can I use relative urls in ajax requests within trigger.io apps on Android 4.4 (kitkat)?

痞子三分冷 提交于 2019-12-13 06:00:32
问题 My trigger.io-bundled jquery-mobile app works great on both android < 4.4 and iOS devices but refuses to load any relative pages, scripts etc. on android 4.4 once jquery mobile loads. Afaik, jqm turns all links to ajax requests, which suggests ajax requests are broken. WebView has been changed to be Chromium 30-based in kitkat and the migration guide mentions url handling as an area of breaking changes (second link below). https://developer.android.com/about/versions/android-4.4.html https:/

jQuery Mobile elements not displaying properly

天大地大妈咪最大 提交于 2019-12-13 05:54:29
问题 I am using jQuery Mobile to display a table. However when i append a new row using addMore button, the display is off! Why is it so? it is suppose to follow the first row. Ans also, it is displayed in black theme on my browser... but it is suppose to be white as in the fiddle. why? Here is my fiddle: http://jsfiddle.net/BgxKW/1/ this is the code to add new row var addmore = '<tr><td style="text-align: center">' + currentIndex + '</td>' + '<td class="small">' + '<div data-role="fieldcontain"

Store images in HTML5 local Storage onClick

元气小坏坏 提交于 2019-12-13 05:19:35
问题 I am currently creating an app as a side project using jQuery Mobile & PhoneGap. This app will show multiple images and gives the user the opportunity to favorite an image that he/she likes. Once the user clicks on the button to favorite the image, that image will display on the favorites page (favorite.html). I am having trouble using local Storage to incorporate this task. Is it even possible to store and retrieve images to another page? Any help will be great. Below is a link to my