FAQ Database Discussion Community


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:...

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 ()...

Jquery Mobile: Horizontal Buttons, fill container

javascript,jquery,jquery-ui,jquery-mobile,mobile
Working on a mobile app, I am trying to create two buttons, that should grow and fill their container. So in portrait view, the two buttons should use up the entire width of their parent, and in landscape view, they should also grow to fill up their entire parent. I...

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"...

how to add 2 radio button horizontal to listview in jquery mobile

jquery,listview,jquery-mobile,radio-button
I want to add 2 radio button horizontal in every row my simplelistview sample ...

jquery mobile button text switching between two text via click

javascript,jquery,jquery-mobile
I have an issue with jquery mobile and a button text switch. The button text should change everytime sie button is clicked. It is working one time only. I click the button, the text and backgound changes, the second time I click it nothing happens. Here ist my code: Button...

jquery mobile swipe stops if i swipe right on the first page and and left on the last page

jquery,jquery-mobile
I have 4 pages and I can swipe between them smoothly. But when I swipe right on the first which doesn't have a page before that or on the last page which doesn't have a page after that, then my swipe stops. It doesn't event go to the next or...

JQuery Mobile - Custom listview height changes on click

css,jquery-mobile
I have a JQuery Mobile listview with a custom item height (50px). Whenever the item is clicked, its height changes. How can I fixate the custom height? Fiddle: http://jsfiddle.net/3gnvhxth/6/ I am using JQuery Mobile v1.45 and JQuery 1.11.1. Before click: After click: HTML: <ul data-role="listview" data-inset="true"> <li class="custom_item"> <a class="custom_link"...

Javascript won't load on links with jQuery mobile included

javascript,python,html,jquery-mobile,flask
Edit: While trying to find the solution, the topic has changed a bit - TL;DR: See the answer. For all interested in the development of the topic, go on ;-) The title might be confusing, but I don't know how to put it in better words - let's say I...

How to edit Content inside Collapsible Widget?

javascript,jquery-mobile,jquery-mobile-collapsible
I am working in Jquery Mobile and have hit my next brick wall, which I am hoping somebody will kindly point out where I am going wrong. I have a collapsible widget which within I wish to amend the content with different values. An example of my HTML <div data-role="collapsible"...

jquery not working for multiple but same class

javascript,php,jquery,html,jquery-mobile
I have this jquery for my mobile menu, to change the class on click jQuery("#slide-out-open").click(function() { if( jQuery( this ).hasClass( "slide-out-open" ) ) { jQuery('#wrapper').css({overflow:"hidden"}); jQuery("body").addClass( 'js-nav' ); jQuery( this ).removeClass('slide-out-open').addClass('slide-out-close'); return false; } else if( jQuery( this ).hasClass( "slide-out-close" ) ) { jQuery('#wrapper').css({overflow:"auto"}); jQuery("body").removeClass( 'js-nav' ); jQuery( this...

Constitution mobile Application-Android

php,android,mysql,jquery-mobile
I am building a Constitution Mobile Application (Android) for my group. I want to seek ideas as to how to choose the appropriate method which will in a long way help my group and its users. I want to know which of the following is the best Creating static pages...

How to save PhoneGap App

android,cordova,jquery-mobile,save,local-storage
currently I am developing an app using PhoneGap and JQueryMobile. By now, the functionality is pretty simple: All the user can do, is to create some buttons and dynamically add them to the screen. What I want to do now, is to make this list of buttons storable. On local...

Jquery Mobile 1.4.5 virtual keyboard in the device hides the form inputs at the bottom of the page

javascript,android,jquery,html,jquery-mobile
I'm using JQuery Mobile 1.4.5 to build a web app. I have found an issue which I'm sure is either a browser or JQM bug when using Google Chrome homescreen (fullscreen) mode in Android (v.4.4.2). When I click on the Click Here!! collapsible header and select the text area, the...

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>...

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)....

Populate data from mysql to ListView (JQuery Mobile) using ajax

ajax,html5,cordova,jquery-mobile
<div data-role="main" class="ui-content"> <ul data-role="listview" id="responsecontainer" > </ul> This is my html file. var output = $('#responsecontainer'); $.ajax({ url: 'http://192.168.1.28/mobile/db_select.php', dataType: 'jsonp', jsonp: 'jsoncallback', timeout: 5000, success: function(data, status){ $.each(data, function(i,item){ var landmark = '<li><a href="#"><h2>'+item.tr_issue+'</h2>' + '<p>'+item.tr_assign+'</p></a></li>'; output.html(landmark);...

jquery mobile pass parameter along with div id href

javascript,jquery,html,jquery-mobile,parameters
I have a jquery mobile app that uses 2 data-role=page divs. <div data-role="page" id="main"></div> <div data-role="page" id="det"></div> On the link to switch from main to truckdet I use <a href="#det">LINK</a> Is there a way to pass a parameter in the href so I can dynamically extract data from a database...

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...

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...

Losing line break when displaying text

javascript,jquery,html,jquery-mobile
I can see the line breaks "↵" for a string in Chrome Developer Tools <br>↵↵<br>Event Status: confirmed↵<br>Event Description: Hog Day (Night )and Hog Day (Day)↵↵Friday... If i double click this and paste to Notepad, the line breaks are preserved. When i save the string to an object like so, var...

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...

Sortable & Droppable issue with 'connectToSortable' changes DOM structure

jquery,jquery-mobile,drag-and-drop,draggable,sortable
I'm creating a a tool to build a form builder of sorts using jQuery UI .draggable, .sortable and .droppable features. The tool itself's does the following: Includes a list of component in which the user can include (drag) to create a form These components can be dragged into a section...

Javascript, Array of Objects?

javascript,oop,jquery-mobile,mobile
I am a bit of a JS noob, but have good .net experience in my pocket. I am working on a mobile website/app, and I have collected some data similar to business listings from a custom web service. On .net, I would have, at this time, started building a custom...

Jquery functionalities are not working when i load the html data from a string into webview

android,jquery,html,jquery-mobile,android-webview
I'm developing an application in which webview loads the html data which is coming as string from the server.Actually showing that html string in webview is working fine but taking long time if there are any images in that data.So,I think of lazy loader will be good in this case....

Undefined variable admob in PhoneGap AdMob plugin

android,ios,node.js,cordova,jquery-mobile
It's difficult for me to explain my problem because my english is not good, hope you would understand. This is my first try to make a mobile game, all done and I want to show ads by AdMob. I have tried some PhoneGap AdMob plugins such as admob-phonegap , cordova-admob-pro...

jQuery mobile appyling on every web page

html,jquery-mobile
I am learning jQuery mobile. I have 3 webpages : Home, About & Contact Us. What i am doing is : <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> <script src="http://code.jquery.com/jquery-1.11.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> I just want to apply jQuery mobile features on home page not on other two. I have written this code only on...

Jquery mobile Deeplinking (sort of)

jquery,jquery-mobile
I am using multi-page jquery mobile and need to create a link from one "page" to content on another "page". Am I able to do it straight through <a> or do I need to add additional code? Code : <body> <div style="min-height: 880px;" class="ui-page ui-body-c" data-role="page" id="Welcome" tabindex="0" data-url="Welcome"> <!---...

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 all the data attribute references does not work

jquery,html,css,cordova,jquery-mobile
In my header i included <link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.css"> <script type="text/javascript" src="js/jquery-1.11.2.js"></script> <script type="text/javascript" src="js/jquery.mobile-1.4.5.js"></script> and whenever I use for example data-role="page" the expected effect does not acquire. why would that happen? edit: https://jsfiddle.net/f0eurafv/1/ notice the text input in the login form...

Missing jQuery Mobile icons on Opera Mini

html,css,jquery-mobile,opera-mini
I'm creating elements like that: <a href="#nav-panel" class="ui-btn-left ui-btn ui-btn-c ui-corner-all ui-btn-icon-notext ui-icon-bars ui-alt-icon ui-nodisc-icon"></a> It works ok on browser like Chrome, Android Browser, Opera, etc. but on Opera Mini icons are not visible. It's just an empty space. jQuery Mobile version is 1.4.5...

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>...

Set same size of all controls in controlgroup div with jQuery Mobile?

javascript,jquery,css,jquery-mobile
I have following controlgroup div as shown at Here . with following code: <div id="Etc" data-role="controlgroup" data-type="horizontal" align="center"> <a target="_blank" href="https://www.facebook.com/icnet.tv" class="ui-btn EnglishText">Join us on Facebook!</a> <a href="#ContactPage" data-transition="flip" class="ui-btn EnglishText">Contact us</a> </div> What do i want is that the Contact Us & Join us on Facebook have the same...

issue with panel data-display push

jquery,jquery-mobile
I'm just getting into jQuery Mobile - loving it but now hitting the learning curve. Basically I want a number of pages that call the same panel. I have the following. Most of it works. However every other "push" fails with the panel content disparaging at the end of the...

Using jQuery to Popup iFrame from URL

javascript,jquery,html,jquery-mobile,iframe
I have inherited some code and I am trying to add an enhancement that will open a popup style iframe with the URL. The way the code is laid out is there are different tab-panes within the html window and in the "content" tab it displays information in the #post-body...

jquery design after dynamically loading

javascript,jquery,html,jquery-mobile
I have a simple javascript App, which gives out some information of BLEs. Everything is working fine, but I have some problems with the JQuery Mobile Library. I want the whole App in simple JQuery Data-Theme="b". Since the List-View is created dynamically through the addDevice function, it's not working with...

jQuery Mobile: absolute external panel on right side not working

javascript,jquery,html,css,jquery-mobile
I want to use an external header and two external panels, one at the left, one at the right. The catch: The panels should be always visible on big screens. I had some problems positioning the panels with an external header (internal works fine), which I could solve for the...

error “The connection to the server was unsuccessful. (file:///android_asset/www/index.html)” in codovar and jqury

android,jquery,cordova,jquery-mobile
I created an app for android using cordova and jquery mobile. It works well when I test run the code using google chrome, but when I try to run it on android emulator using android studio in cmd (locate>cordova emulate android) it doesn't working. When i try to run it...

How to capture events for dynamically created data-role=“collapsible”

jquery-mobile
Could you please let me know how to capture the events for data-role="collapsible" This is my fiddle http://jsfiddle.net/5kbEE/18/ I have tried it this way $('.my-collaspible').on('collapsibleexpand', function() { alert('herere'); }); How ever i observed that the above event is working fine in case the data-role="collapsible" is static one (http://jsfiddle.net/5kbEE/19/). Could you...

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...

Cannot create custom toolbar button that works on mobile

javascript,jquery,jquery-mobile,mobile,photoswipe
I have the simple code: <button class="pswp__button" id="CustomButton" style="background:none;" title="Custom" onclick="CustomClicked()"> <img src="~/CustomImage.jpg""> </button> This works as expected on desktop browsers. When I switch to mobile though, I cannot get the event to fire when I tap the button. I've tried attaching every event handler I can think of: tap,...

How is Facebook able to autoplay videos on mobile browsers

facebook,jquery-mobile,javascript-events,facebook-javascript-sdk,html5-video
I realize that many questions have been asked about autoplay videos on mobile devices but before my question is marked as a duplicate, I must say that I looked through a lot of those questions and answers and I have not found a satisfactory answer. Mostly, all of the answers...

Why this mobile navigation toggle not working properly?

javascript,jquery,css,jquery-mobile,toggle
I am trying to create a mobile navigation (toggle type) on a breaking point 768px. My mark up is: <div class="tm_menu_mobile"> <div class="menu_icon"> <div class="three_line"></div> <div class="three_line"></div> <div class="three_line"></div> </div> <div style="clear:both;"></div> <div id="nav"> <div class="navigasi_menu"> <div class="navigasi_list"> <div class="nav-menu"> <ul> <li class="page_item page-item-7"><a...

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,...

Leaflet Map error on jquery mobile

jquery,jquery-mobile,leaflet
I'm adding a simple map on jqm. The issue I am getting in console is: GET http://a.tile.openstreetmap.org/NaN/0/0.png 404 (Not Found) JS: var map = L.map('map'); $(document).on("pageinit", function () { L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {maxZoom: 18}).addTo(map); }) On a click function adding a Marker with: L.marker([39, -6.85]).bindPopup("test").addTo(map); map.panTo(L.latLng[39, -6.85]); Using leaflet 0.8. It seems...

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...

jQuery mobile elements not aligned center in div

jquery,css,jquery-mobile
I'm developing a jquery mobile application. I have a wrapper div that has css set to text-align: center. The problem is that the text input and checkbox elements are not getting aligned into the center of the login div. I suppose I have to override the jquery mobile CSS but...

How to add new elements to the page via function calls, and attach event handlers to them, without specifying them inside the function?

jquery,jquery-ui,jquery-mobile
So I have an app. It's written on jQuery(UI & Mobile). I have this page structure: Main Page: <!-- Main Page --> <div data-role="page" id="home"> <header data-role="header" data-theme="a"> <h1>Running Tracker</h1> </header> <div data-role="navbar"> <ul> <li> <a href="#add" data-transition="fade" data-icon="plus">Add Run</a> </li> </ul> </div> <div data-role="content"> <h3>Welcome to the RunningTracker App</h3>...

Updating a DIV inside a Collapsible in JQuery Mobile only when the Collapsible is opened (eg. load on demand)

html,jquery-mobile,external,jquery-mobile-collapsible
I'm trying to execute a call to an external program to create content in a DIV inside a collapsible in JQuery Mobile, to have some code run when a div in a JQM collapsible appears when the collapsible is opened. I'm trying to use the jquery.appear plugin (https://github.com/morr/jquery.appear) as follows:...

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...

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...

Use different library instead of jQuery Mobile for