FAQ Database Discussion Community


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

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

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

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

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 click event not working on mobile device

javascript,jquery,css,jquery-mobile,touch
I am trying to make the below JSFiddle work for tablet/mobile devices (e.g. 'on touch' as well as 'click'). https://jsfiddle.net/lkw274/7zt1zL0g/87/ <div class="user-navigation"> <a class="mobile-menu-new" href=""><span></span>Menu</a> </div> $(document).ready(function() { $(".user-navigation a.mobile-menu-new").click(function (e) { e.preventDefault(); $(".user-navigation a.mobile-menu-new").toggleClass("current"); }); }); .current { background: #F00;} Expected behaviour: On clicking 'Menu', either by touch...

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

Get selected columns for a columntoggle table

jquery-mobile
I have a columntoggle table with some information in it. I would like to get what are the selected columns, to stock those values in a database and when the user logs back in, using those values to make the table load with the columns he has previously selected. Is...

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

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

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

When binding a single click event to multiple buttons, how can I make the clicked button do one thing and all the other buttons do another?

javascript,jquery,html,css,jquery-mobile
I've got three buttons within a ui-grid-b <div class="ui-grid-b"> <div class="ui-block-a"><button id="btnOvenA" style="width:100%" value="a">A</button></div> <div class="ui-block-b"><button id="btnOvenB" style="width:100%" value="b">B</button></div> <div class="ui-block-c"><button id="btnOvenC" style="width:100%" value="c">C</button></div> </div> whenever a button is clicked, I want to turn its text red. I want to turn the others text blue. My click event...

jQuery mobile - generating html dynamically not working with iframe

jquery,html,jquery-mobile,iframe,overlay
First things first here is my js $(document).ready(function(){ $('<a>Launch</a>').attr({'href':'#popupBasic','data-rel':'popup','data-transition':'pop','class':'ui-btn ui-corner-all ui-shadow ui-btn-inline'}).appendTo('body') $("<div></div>").attr({'data-role':'popup', 'id':'popupBasic'}).appendTo('body') $('#popupBasic').html('<iframe src="http://www.example.org"></iframe>') }); Through testing I have narrowed the problem down to the iframe. For whatever reason when I use jQuery to create the...

Unexpected data representation

javascript,jquery,jquery-ui,jquery-mobile,local-storage
So I have an app, that allows you to add data, and then it displays all the data(still wip). So I made a Create and Read functionality so far using localStorage and jQueryMobile and jQueryUI. But for some reason when I switch between pages(main page/add data page), I see cloned...

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

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

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

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

How do I know how many physical inches a device screen has?

javascript,android,ios,css,jquery-mobile
I have a website that needs to distinguish between mobile phones, tablets, and ordinary laptops. Normally I could use an asp.net function to tell, but the complication is that I want tablets to be treated as NOT being mobile devices. Any device with a screen diagonal greater than 7.5 inches...

$(“:mobile-pagecontainer” ).pagecontainer( “change” not working on second time

jquery-mobile
On click of a button , i am reloading the same page this way (document).on('click', '.cancelyes', function(event) { alert('herree'); var uuid = '123'; var screen_id = '910'; var cust_id = '122'; var minimum_order = 133; var addreslabel = '222' $(":mobile-pagecontainer" ).pagecontainer( "change", "index.html?UUID=" + uuid + '&screen_id=' + screen_id +...

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

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

Is it possible to remove pagecreate event?

jquery-mobile
I have a pagecreate declaration in my page. It is created each time I read a json file for each value in it. The problem is that if I read the json file 3 times (with a refreshing button), pagecreate is declared 3 times for each value. So I get...

JQuery Mobile listview inside a panel

jquery-mobile,jquery-mobile-listview,jquery-mobile-collapsible,jquery-mobile-panel
I am trying to use listviews with collapsable items within a panel, but I am getting strange results. Specifically, this is a minimal code I am using. Note that everything in the list view is taken from a JQuery Mobile example, so I would expect it to work out of...

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

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

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

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

jquery form inserting with php

php,jquery-mobile,mysqli,insert
please help find the sourse of my codes issue...when I click request the page just refreshes with all the data gone but nothing is inserted into the db... here is the image of the db and the code! what do I need to change to be able to insert the...

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

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

Use different library instead of jQuery Mobile for