jquery-mobile

jQuery mobile pagecontainer load()

浪子不回头ぞ 提交于 2019-12-11 19:53:30
问题 What does this code do? $(":mobile-pagecontainer").pagecontainer("load", "#welcome2"); I have a jQuery UI autocomplete input box which I initialize, but it only works if any of the following is true: I call load on the fragment. The visitor starts on #welcome2 (rather than coming from #welcome1 ) I don't understand what load does or why I need it. EDIT: Could it be something with the order in which jQuery UI and jQuery mobile are loaded? EDIT2: It seems no widgets on not-loaded fragment are

jQuery mobile retrieving data between pages

不打扰是莪最后的温柔 提交于 2019-12-11 19:51:20
问题 I'm using jquery mobile in a phonegap application and I'm trying to pass a variable from a textbox in to the next page to do an xml traverse with the variable. My page has this javascript to send the variable through but I don't know how to retrieve it on the next page. <script type="text/javascript"> $("#s-sur").live('pageinit', function() { $("#search").click(function() { $.mobile.changePage( "ssname.html", { type: "post", data: $("#search").serialize() }); }); }); </script> 回答1: The ssname

Scroll a scrollable div to its top programatically

廉价感情. 提交于 2019-12-11 19:42:42
问题 I have a scrollable div with a fixed height and a long list inside it. I want to scroll to top in the scrollable div when I scroll down with the long list. how should I start with this. I tried to find any answer but all refer to using scrollTop or offset, but I just can't get this to work. I tried scrollTop on the div that is scrollable, but it is always undefined I am using JQuery-mobile. I have the following setup <div id="scrollable"> <div id="inner"> <div id="content_wrapper"> <div>...<

JQuery mobile datepicker doesn't work

我与影子孤独终老i 提交于 2019-12-11 19:39:35
问题 I'm trying to use a standard datepicker for HTML, JQuery Mobile. But for some reason any version i try doesn't work. I think it might be something with the stylesheet I have selected or the JQuery Mobile links. Here is the code: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta content="text/html; charset=windows-1255" http-equiv="content-type"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/resources/demos/style.css" /> <link rel

Listview looks weird - jQuery

限于喜欢 提交于 2019-12-11 19:38:39
问题 I'm having some trouble with my ListView. It doesn't have the nice look that jQuery offers, but just a plain list and I don't have any idea how this would come. This is the code (HTML) <div data-role="page" id="home"> <div data-role="header"> <h1>Bestelling</h1> <a class="ui-btn-right" href="#toevoegen">+</a> </div> <div data-role="content"> <ul data-role="listview" data-inset="true" id="bestellingLijst"> <!-- Hier komt de bestelling --> </ul> </div> </div> And here is the code where I add a

pagecontainer change function not working

♀尐吖头ヾ 提交于 2019-12-11 19:38:03
问题 I can get the pagecontainer change function to work inside a function that is called with a button click. But for some reason the pagecontainer change function isn't working when I run the code outside of a function. I do a check to see if a user is logged in and then want to do a page change/redirect if they aren't logged in. <script> //works function test() { $(':mobile-pagecontainer').pagecontainer('change', '#event-list-page'); } //doesn't work var user = window.localStorage.getItem("user

PhoenGap app not detecting swipe

 ̄綄美尐妖づ 提交于 2019-12-11 19:34:38
问题 I have a PhoneGap 2.9 app running on Android 4.4 and it takes several tries to detect a swipe event from jQuery Mobile (v.1.10). This same code runs beautifully on Android 4.3. I have tried changing the values for $.event.special.swipe.durationThreshold $.event.special.swipe.horizontalDistanceThreshold but these do not seem to help at all. Any suggestions? Below is how I am hooking up the swipe event: $(document).on("swipe", '.collapsed', function (e) { // do something }); 回答1: Set the target

jquery mobile button state remains active in phonegap android

做~自己de王妃 提交于 2019-12-11 19:23:04
问题 I have created a button in my app its working fine but the problem is when I press the button it changes color and remains active after the operation is performed. I am using jquery.mobile-1.3.1.min.css Here is the code for the button: <a href="index.html" class="camerabtn" data-role="button" data-icon="camerabtn" data-iconpos="top" data-inline="true" onClick="capturePhoto();"></a> I have tried using this code to reset the active state of button its working but the problem with that is when

JQM: Dynamic nested collapsibles - $(collapsible).collapsible() & $(collapsible).trigger('create')

感情迁移 提交于 2019-12-11 19:19:05
问题 I am new with JQM, but I have read quite a few blogs and documentation but this knowledge is not helping me here. I have read about page create vs refresh events. With the examples I have seen on jsfiddle the create event works fine. But when I tried to code, it doesn't seem to work. I am dynamically injecting collapsibes into the DOM on expand. Somebody please point out of what I'm doing wrong. For me $(collapsible).collapsible() & $(collapsible).trigger('create') do not work when done on

Jquery Mobile Not working with Phonegap/Cordova

一个人想着一个人 提交于 2019-12-11 18:58:25
问题 I am stucked in working with Phonegap + jquery Mobile, My Page is working fine when i remove Jquery Mobile phonegap API is also working but as soon as I include Jquery Mobile in it. The Applications starts showing the grey dot in center with no content. <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="format-detection" content="telephone=no" /> <meta name="viewport" content="user-scalable=no, initial-scale=1" /> <link rel="stylesheet" type="text/css" href="css/index.css" />