FAQ Database Discussion Community


How to get popups to be defined outside the page they're used in?

jquery-mobile,popup
According to this github: https://github.com/jquery/jquery-mobile/issues/4565 this issue is reportedly resolved yet I have tried to place a popup outside the div of the page a popup button is using latest jqm 1.4.5 and was unable to get the popup to work unless its popup is within the same div as...

text-align :center not working

jquery,html,css,jquery-mobile
I am using jquery mobile and have the following html and css: .ui-grid-a { padding: 0; margin: 0; margin-top: 15px; height: 380px; } .ui-block-a, .ui-block-b { padding: 0; margin: 0; height: 33.3%; } .ui-block-a a, .ui-block-b a { width: 50%; } .ui-bar-a, ui-bar { margin: 0 auto; padding: 0; height:...

Different performance with Intel XDK

cordova,jquery-mobile,phonegap-build,intel-xdk
I use Intel XDK to develop apps with HTML and Cordova. I use jQuery Mobile. My question is: Why if I debug app with XDK and an Android device I have a very good performance, and if I compile app into an .apk, same code works very very slow? Thanks...

controlgroup('refresh') not working

jquery,jquery-mobile
I am having problems using both enhanceWithin() and controgroup('refresh'). i posted a question last month about a similar thing(link) and i was help but when i try to apply what i understood it just doesnt work. My problem is I want all the possible answers in the quiz to look...

Snake Game with Mobile Button Controls

javascript,jquery,jquery-mobile,canvas,html5-canvas
In this Snake game, I need the buttons to control the snake just like the arrow keys do. This will allow the game to be played on a mobile device. You can see i have code in there for the buttons, but they are not working properly and not controlling...

Unable to programatically check a checkbox when using jQuery Mobile

javascript,jquery,jquery-mobile,checkbox
I have been trying to mark a set of checkboxes as checked using jQuery. I cannot seem to work out why. Javascript: function getProjects(course){ console.log("getProjects"); var data = { "fn" : "pLoad", "course" : course, "ajax" : "true" }; $.ajax({ type: "GET", url: SERVICE_URL, //Relative or absolute path to response.php...

JQuery - Detect dimension of screen in cm/inches or alternative for displaying on mobile platforms

jquery,jquery-mobile,mobile
I have looked through all the information that I have been able to. As far as I can tell, it appears as if there is no way to detect the dimensions of a screen in cm/inches using jquery. I was wanting to do this because on mobile phones and tablets,...

Add a background behind loader to hide loading screen

javascript,jquery,jquery-ui,jquery-mobile
How can one add a bgcolor behind the loader before a page is created just to hide the white screen before the page is loaded. this is my code. setTimeout(function(){ $.mobile.loading('show', { text: 'Chargement en cours...', textVisible: true, theme: 'a', html: "<span class='ui-bar ui-overlay-c ui-corner-all' ><img width='50px' height='50px' src='http://www.shougun.it/images/loading.gif' /><br><h2>Chargement...

jQuery mobile Listview overflow not working

javascript,jquery,html,jquery-mobile
I have this HTML page. (I use jQuery mobile 1.3.1) It should be something like a little chat-window. The problem I have is that, when you look at the <li> elements, this <ul data-role="listview"> element should be scrollable. But, for some reason it simply isn't scrollable, because the content seems...

Can't Add Up Radio Button Values with jQuery

javascript,jquery,html5,jquery-mobile,javascript-events
I'm trying to add up all the values of the radio buttons selected on Submit button press. It sometimes changes the 0 to a 200, but it isn't adding correctly. I'm not quite sure what is going on with this one, since the total amount sometimes changes, but isn't accurate....

JQuery Mobile content only shown on reload

javascript,html,jquery-mobile
I have an index.html containing the following: index.html <html> <head>...</head> <body> <div data-role="page" id="pageone"> <div data-role="header"> <div data-role="navbar"> <ul> <li><a href="#pagetwo" id="pagetwo">Page two</a> </li> <li><a href="#pagethree" id="pagethree">Page three</a> </li> </ul> </div> </div> <div data-role="page" id="pagetwo"> </div> <div data-role="page" id="pagethree"> <div...

jQuery mobile data-role=“button” not formatting

jquery-mobile,button
I'm loading into another div with .load('settings.html') function in The settings.html page being loaded contains: <div style="text-align: center; border: 1px solid black"> Application Settings: <br> <a href="#" onclick="resetApp()" data-role="button">Reset Application Key</a> </div> The problem is that the button is not getting formatted as per jquery mobile button data-role. If I...

jQuery Mobile: Position of external panel / always visible?

javascript,jquery,html,css,jquery-mobile
Since I do want to use the same panel on every page in a jQuery multipage html file, I'm interested in using the same code for every page. This should work with external panels. However, I do have a problem with the positioning: As far as I can see, an...

jQuery mobile radio button changed event always fires even if already checked

jquery,jquery-mobile,event-handling,radio-button,onchange
I'm using a radio button group containing two radio buttons to dynamically change the content of my page depending on which radio button is checked. The content should be updated, when the selected radio button changes. Therefor i added an event handler to the radio buttons. html: <fieldset data-role="controlgroup" data-type="horizontal"...

Dynamically changing select value of jQuery Mobile select box

jquery-mobile
I have dynamically created select menu. How can I dynamically change selected value to third value(Apple). HTML <div> <select id="stylex" data-mini="true"> </select> </div> Code var wid_settings = ["Banana","Orange","Apple","Mango"]; wid_settings_refresh(); function wid_settings_refresh() { var index; for (index = 0; index < wid_settings.length; index++) { $('#stylex').append('<option value='+index+'>'+wid_settings[index]+'</option>'); } $('#stylex').listview('refresh'); } // this...

jQuery Accordion doesn't load unless I refresh the page

jquery-ui,jquery-mobile,accordion
I am trying to use Accordion in my page, but it doesn't load unless I refresh the page. Here is the link: http://mzprojects.net/191stband/191stband.html click on the menu panel and click ensembles. The accordion does not work unless you refresh you page. Please look at the source code for the ensembles...

jquery mobile load external page, events not getting triggered

jquery-mobile,jquery-mobile-pageshow
I want to transition to an external jquery mobile page, but none event is getting trigger, when the transition is called: jQuery("#test1").on("pagebeforeshow", function(event) { WL.Logger.debug("pagebeforeshow: test1"); }); function loadHTML(){ $.mobile.pageContainer.pagecontainer("load", "./pages/test1/test1.html", {}); } function openHTML(){ $.mobile.pageContainer.pagecontainer("change", "./pages/test1/test1.html", {}); } and this is the content on my HTML : <div data-role="page"...

Android 4.4.4 WebView in onPageFinished() getTitle() returns page URL?

android,jquery-mobile
I don't know if I am misunderstanding jQueryMobile or am I seeing a Chromium Webview bug. I have an Android app that uses a webview to display jQueryMobile content. When the user navigates within the DIVs of the page, in onPageFinished() I call getTitle() to retrieve the Html page title....

jQuery mobile panel doesn't close fully only on Android browser

javascript,android,jquery,html,jquery-mobile
JSFiddle: http://jsfiddle.net/nbh1rn33/ I have a weird issue with jQm panel. An opened panel doesn't close fully. See below image: Strangely, this only happens on Android browser, and not on PC (Chrome, IE). Is this a bug with jQm or have I done something wrong? <!DOCTYPE html> <html> <head> <meta name="viewport"...

Height of floating divs are zero at first time, but ok at second time

jquery,jquery-mobile
I have a jQuery mobile site, and I want to show three floating divs. Because I do not know the content of the divs, I do not know the heights of them, but I want to make them to be equal height. I thought, this is so simple with the...

Parsing XML array using Jquery

javascript,jquery,xml,jquery-mobile
I have stuck up with an issue of passing XML using Jquery. I am getting empty array while traversing to jquery.Please help me how to get datas from XML array. I have mentioned my code below. XML <?xml version="1.0" encoding="UTF-8"?> <json> <json> <CustomerName>999GIZA MID INSURANCEAND SERVICES PVT LTD</CustomerName> <mobiLastReceiptDate>null</mobiLastReceiptDate> </json>...

Can't change skrollr-menu scroll speed (duration)

javascript,jquery,jquery-mobile,parallax,skrollr
I'm trying to implement skrollr-menu into my website. What I want it to do is scroll down to the very bottom when the button is clicked (which I've got working just fine. The problem is that no matter what I do, I cannot get it to go any slower than...

How to open a jQuery Mobile popup programmatically and close it after 5 seconds

javascript,html,jquery-mobile,popup
I want to open a jQuery Mobile popup programmatically and then close it after some seconds, here is my code : is there anything wrong, cause I'm not getting what I want to show $( "#p" ).popup( "open" ); setTimeout( function(){ $( "#p" ).popup( "close" ); }, 5000 ); <script...

Change the width of a SINGLE JQuery Mobile Input field?

jquery-mobile
The other two answers on this question propose overriding div.ui-input-text {} However, I have multiple input fields on this page and also within my project. So those answers won't work as they would effect everything on my page or project. How can I modify a single text input? A class...

Display Mobile Compatible when it's on mobile

css,jquery-mobile,mobile
Please allow me to ask a silly question about Google's site(google.com). I have tested their site with computer browsers and smartphone browsers. Okay! Here is the question that i have, when the time i make the computer browser to a small screen, the layout of Google's site does not fit...

Is it possible to get transation flip effects when showing a div manually

jquery-mobile
Is it possible to get transation flip effects when showing a div manually , similar way as we get when using functins like $(':mobile-pagecontainer').pagecontainer("change", "create_an_account.html?UUID=" + UUID, { transition: 'flip' }); This is my fiddle http://jsfiddle.net/EwNRJ/2265/ Could you please let me know how to achieve this??...

jquerymobile pagecontainerbeforeshow only run when refresh page

cordova,jquery-mobile
I´m develop my first hybrid app, and i work with jquerymobile 1.4. the documentation suggests using method pagecontainer. Well, i need populate dynamically one select whit certains values of a xml file, before show the page. If debug app, this only runs when page recharge, not when open. (Chrome nav)....

EnhanceWithin() is not working

jquery,jquery-mobile
am trying to populate a list view via ajax and jquery. after i have populated the data. the enhancement doesnt show. this is what i did. Fiddle Result var poss_ans = "6,4,8,2"; var possibleAnswers = poss_ans.split(","); //poss_ans is string containing all the answer from the database $(document).on("pagecreate", "#page1", function ()...

targeting jquery ui buttons

jquery,jquery-ui,jquery-mobile
I am trying to change the jquery mobile ui button class into a plus sign. What I have used below. New code trying to use: $('[id*=new] span.ui-btn-inner').removeClass('ui-btn-inner').addClass('ui-icon-plus'); Below is the current code -- <td align="left"> <a href="javascript:submitAction_win0(document.win0,'$IF$new$0$$0');" tabindex="51" id="$IF$new$0$$0" name="$IF$new$0$$0" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-up-c" style="padding-top: 8px; padding-bottom: 8px;" data-corners="true" data-shadow="true"...

fixed footer with windowsphone 8.1, cordova and jquery mobile not working correctly

cordova,jquery-mobile,windows-phone-8.1,windows-phone-8-emulator
I want to use a fixed footer in my cordova project. I m currently testing my development on a windowsphone 8 device and emulator. I used two different sizes of the emulator and receive two problems (one for each) regarding the positioning. html code: <div data-role="footer" data-position="fixed"> <div data-role="navbar"> <ul>...

Jquery mobile dialogbox without changing page

cordova,jquery-mobile
I have to display dynamic popups in phonegap appliction.I made the popups dynamic using Jquery mobile and javascript but popup have white background throughout the application. Please help me to get this in correct form. Html code: <div id="popupMsgPage" data-role="popup" data-close-btn="right" data-theme="c" data-overlay-theme="c"> <div data-role="header" data-position="fixed" > <h1 id="popup-head">Delete Page?</h1>...

onClick event in jQuery mobile do not work

javascript,jquery,jquery-mobile
I am new to jQuery and have made a page with some buttons i want to do some actions when they are clicked. I have made a jsFiddle with my code. When I execute the code on my laptop with chrome, it works fine. But when I execute it from...

Use different library instead of jQuery Mobile for