jquery-mobile

Handle Dialog Close event

喜你入骨 提交于 2019-12-12 04:34:25
问题 My post submits the form and displays the dialog after it successfully submits everything. I am curious as how to change the event when this dialog is closed out by the X in the top corner to close something else as well such as another dialog. $.post("test.php", $("#payment-form").serialize(),function(){ $.mobile.changePage('#successfulPurchase'); }); I want to do $("#subscribePage").dialog('close'); when the successfulPurchase dialog is closed out 回答1: If you want to redirect a user when a

trying to make navigation bar for tablet site

泄露秘密 提交于 2019-12-12 04:17:39
问题 I'm designing a navigation bar for a tablet website. The navigation bar holds elements displayed horizontally, and I want to be able to display new elements with a swipe (kind of like a cover flow) without the window moving. This is the code I'm using now (jQuery Mobile): //Tablet Features $('#navHolder').bind('swipe', function(e) { $('#navHolder').animate({left:thisLeft - 100}); } ); I dont think I can trigger a swipe without first disabling scroll, but I'm open to all suggestions. Please

Need help to make non-collapsible section using jQuery mobile

倖福魔咒の 提交于 2019-12-12 03:58:54
问题 <div data-role="collapsible-set"> <div data-role="collapsible" data-collapsed="false"> <h3>Section 1</h3> <p>I'm the collapsible set content for section 1.</p> </div> <div data-role="collapsible"> <h3>Section 2</h3> <p>I'm the collapsible set content for section 2.</p> </div> <div> <!--I tried this but this only makes simple heading without any background style used for other collapsible section headings--> <h3>Read only Section 3</h3> </div> </div> using the above pattern I want to make some

Change element class on first click then click again and change back to normal

China☆狼群 提交于 2019-12-12 03:57:25
问题 I have the following code: for (var i=0; i<len; i++){ var benID = results.rows.item(i).ID; $('#'+element_id).append( "<li><a>"+results.rows.item(i).nombres+" "+results.rows.item(i).apellidos+'</a>'+ '<a href="#" data-position-to="window" data-icon="check" class="'+page+'_dis_ben_'+benID+'">Eliminar</a></li>'); $("."+page+"_dis_ben_"+benID).click(function(){ console.log("Item to disable: "+benID); $(this).children('span.ui-btn-inner').children('span.ui-btn-icon-notext').children('span.ui-btn

Android + PhoneGap + jQuery Validate - not firing

南楼画角 提交于 2019-12-12 03:45:31
问题 I'm using jQuery Mobile with jQuery Validate. I have multiple forms that post with ajax serialize once all pages have been completed. The 'next' button below works on iOS and Android when accessed from the native browser. When I package with PhoneGap and run on Android, the validation does not fire. Everything else works fine. If I remove the valid() condition, the button works as expected. So it must be an issue with how I'm using jQuery Validate. I've tried shifting the order of things in

Tapping on scrolled list generates tap event for wrong element

风格不统一 提交于 2019-12-12 03:41:53
问题 Our HTML5 site generates the tap event for the wrong element when scrolling through a list. To reproduce: 1) Visit www.tekiki.com on your iPhone or iOS device. Scroll through the list rapidly. 2) Tap on one of the items while the list is still scrolling. The wrong item gets displayed because the tap event is generated for the wrong element. We're using jQuery Mobile 1.4. How can we fix this? 回答1: Maybe this is an issue with the 300ms delay. Use the fastclick library to remove the delay. This

Simple Data binding jquery mobile listview

拈花ヽ惹草 提交于 2019-12-12 03:35:27
问题 I'm new to Jquery mobile. I'm trying to bind data to a listview. below is my code. when i run the page it's not showing the listview. please help. My service Method [WebMethod] public static string[] GetNames() { string[] names = {"chamara","janaka","asanka" }; return names; } My HTML code: <form id="form1" runat="server"> <div data-role="page" id="index"> <div data-role="header"> <h1> demo</h1> </div> <div data-role="content"> <ul data-role="listview" data-inset="true" id="cars-data"> </ul>

alert message not displayed in jquery mobile application

丶灬走出姿态 提交于 2019-12-12 03:29:12
问题 I am new to jquery and jquery mobile. I am currently trying to create a simple mobile application that, once a page is loaded, displays an alert message. I have added in the head section of the html file, as suggested, the following code: <link rel="stylesheet" href="jquery.mobile-1.3.0.min.css" /> <script type="text/javascript" src="jquery-1.9.1.min.js"></script> <script type="text/javascript"> $('#chart').live('pageinit', function() { alert('jQuery Mobile: pageinit for Config page'); }); <

$.getScript and css issue with phonegap and jquery mobile

岁酱吖の 提交于 2019-12-12 03:23:12
问题 here are my files. /www/js/index.js is left as it is. page flow should be: app starts -> index.html -> loads MainPage.html from indexB.js -> MainPage.html but all css don't get loaded. When i remove 'body onload="init();"' from index.html and copy&past MainPage.html onto index.html's body, css works with no problem. From this, i checked that all the css routes are correct. /www/index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="viewport" content="width

Jquery-Mobile: How to call the external java script function from html

雨燕双飞 提交于 2019-12-12 03:22:51
问题 I am new to JQM. I want to call the external java script function from the html. For this i am including external javascript file in head tag like this. <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Single page template</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" type="text/css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script type