jquery-mobile

How to use .animate() to override jqm listview theme styling

时光毁灭记忆、已成空白 提交于 2019-12-12 23:23:19
问题 I have a jqm listview. When a user clicks one of the li in the listview I want to animate the li so that it's background color slowly changes to red. I can't seem to make this work, although I can use .addClass(".red") to instantly turn the li's background-color to red. This approach could work, but I'd want to establish a slower duration for the addClass(), and that doesn't work either. Check out this fiddle for both approaches 回答1: From the jQuery docs: All animated properties should be

iScroll inside iScroll - nested iScroll unexpected behavior

这一生的挚爱 提交于 2019-12-12 22:21:02
问题 I have 2 lists and I use iScroll for vertical scrolling. The second list is inside the first list. When I scroll the second list, the first list is also scrolling. I want that when I scroll the inside list (the second list), the main list (the first list) will not scroll. How can I do that? Here is an Example: <div id="wrapper" style="overflow: hidden;"> <div id="scroller"> <ul id="thelist"> <li>Pretty row 1</li> <li>Pretty row 2</li> <li>Pretty row 3</li> <li>Pretty row 4</li> <li>Pretty row

Disabling swipe on a specific div

半腔热情 提交于 2019-12-12 22:10:54
问题 Having this jQuery Mobile 1.9.1 code, to take care of showing side panels when the user swipes right or left... $(document).on("pageinit",".ui-page",function(){ var $page=$(this); $page.on("swipeleft swiperight",function(e){ if($page.jqmData("panel")!=="open"){ if(e.type==="swiperight"){ $page.find("#menu").panel("open"); }else if(e.type==="swipeleft"){ $page.find("#menu2").panel("open"); } } }); }); This creates a problem when using an image slider with swiping capabilities. Inside the

Jquery Mobile pageLoading() Method how does it work?

最后都变了- 提交于 2019-12-12 22:05:43
问题 I am new to Jquery Mobile and attempting to learn it as I redevelop this mobile site. So I am doing all my navigation with different divs with data-role="page". and navigating with the #pagename. My question being doing my navigation this way how do I use the loading message and wait to make the transition until the next page is loaded? I tried putting the $.mobile.pageLoading() in the onClick attribute of the link but that didn't work. 回答1: Using JQM 1.0 beta 1 //show $.mobile

Jquery Mobile + Phonegap improve listview performance

对着背影说爱祢 提交于 2019-12-12 22:00:41
问题 In my JQM 1.4 + Phonegap 3.6 app, I am using a listview as in the following code. HTML: <div id="boardselection"> <ul id="modelsListview" data-role="listview" data-icon="false"> </ul> </div> JS: function resetModelsListView(prodata, firsttime, funfeatureOn, specificBrand, specificPro) { console.log("on passe dans resetModelsListView"); // funfeatureOn = 0; //debug timer var time = []; var dummy; var i; var listviewdeferred = $.Deferred(); var optionspro = ''; var optionsbrand = ''; var

How to select or unselect all checkboxes in JQuery Mobile?

邮差的信 提交于 2019-12-12 20:49:25
问题 I have several collapsible check-boxes, and am trying to check/uncheck all the boxes within that section. HTML Currently when I click on the main checkbox, it simply opens and closes the collapsible dialog. <li data-role="collapsible" id="educationlayers"> <h3> <input type="checkbox" name="education" id="education" class="layers"/> <label for="education">Education</label> </h3> <fieldset data-role="controlgroup"> <input type="checkbox" data-mini="true" name="education" id="daycare" class=

jQuery Mobile click event.preventDefault does not seem to prevent change

对着背影说爱祢 提交于 2019-12-12 20:23:40
问题 I am trying to prevent a radio button from changing when a use clicks, it works when using standard jQuery but when you include jQuery Mobile it does not seem to work, is there something else I have to do in jQuery Mobile? <fieldset data-role="controlgroup" data-type="horizontal"> <input type="radio" name="trade-direction" id="buy" value="B" checked="checked" /> <label for="buy">Buy</label> <input type="radio" name="trade-direction" id="hold" value="H" /> <label for="hold">Hold</label> <input

jquery mobile input masking not working

怎甘沉沦 提交于 2019-12-12 20:21:23
问题 I am trying to mask SSN input using jquery mask plugin, however it doesn't seem to play well with jquery mobile. The code is here. Appreciate any help. If this doesnt work, what are the alternatives? Also copied the code for reference below: Scripts: jquery.mobile-1.0.1.min.css jquery-1.6.4.min.js jquery.mobile-1.0.1.min.js $("#ssnprimary").mask("999-99-9999"); HTML: <div data-role="page" id="mainpage"> <div data-role="header"> <h1> My Test </h1> </div><!-- /header --> <div data-role="content

JQueryMobile listen click

a 夏天 提交于 2019-12-12 19:55:46
问题 I am trying to understand the page events in jQueryMobile navigation, but I found some very weird behaviour, as some event handlers get called several times: I have two pages: home.html and disclaimer.html. Both contain the same header: <head> <script src="js/jquery-1.8.2.min.js"></script> <script src="js/events.js"></script> <script src="js/jquery.mobile-1.2.0.min.js"></script> </head> On the page home.html is a link: <section data-role="page" id="home"> <a href="#" id="test">Test</a> <

Opening all external links in Phongap's ChildBrowser using jQuery Mobile

半世苍凉 提交于 2019-12-12 19:35:10
问题 I'm using jQuery Mobile & Phonegap, and have the following code to open all external links in a certain div with the ChildBrowser: $('.someDIV a').live('click', function() { var thisUrl = $(this).attr('href'); PhoneGap.exec("ChildBrowserCommand.showWebPage", thisUrl); return false; }); For some reason, while the page loads in the childbrowser, it also loads in the background, as if there's no "return false". I've found a workaround by giving the link's href attribute a value of "#", and using