jquery-mobile

Mobile web: how to get physical pixel size?

穿精又带淫゛_ 提交于 2019-12-17 09:47:56
问题 I am creating a web app using jQuery Mobile and PhoneGap. There is a graph and if the user is using a large screen, I would like to display more points on this graph, because points are tappable and the shouldn't be too close (physically). For example: if someone has an iPhone, I want to display N points on the line graph. If he has an iPad, i want to display 2xN points (cause iPad has physically larger screen), but if he has some newer Android phone that is physically small like an iPhone

Disable scrolling when touch moving certain element

徘徊边缘 提交于 2019-12-17 08:29:32
问题 I have a page with a section to sketch a drawing in. But the touchmove events, at least the vertical ones, are also scrolling the page (which degrades the sketching experience) when using it on a mobile browser. Is there a way to either a) disable & re-enable the scrolling of the page (so I can turn it off when each line is started, but turn it back on after each is done), or b) disable the default handling of touchmove events (and presumably the scrolling) that go to the canvas the sketch is

Populating jQuery Mobile ListView with local JSON data

寵の児 提交于 2019-12-17 06:56:34
问题 I am trying to populate a JQM ListView with a local JSON information. However, no list items are created. Any help would be appreciated. Here is my code: JSON File Structure: [ { "name" : "test" "calories" : "1000" "fat" : "100" "protein" : "100" "carbohydrates" : "800" }, { "name" : "test2" "calories" : "10000" "fat" : "343" "protein" : "3434" "carbohydrates" : "4343" } ] HTML: <div data-role="page" data-title="Search" id="searchPage"> <ul data-role="listview" data-inset="true" id=

fullcalendar multiple cell select on mobile device?

淺唱寂寞╮ 提交于 2019-12-17 03:16:31
问题 I have created a fullcalendar application for mobile device like Android and iPhone using Phonegap. I am using the Jquery Touch Punch Plugin along with the Jquery fullcalendar plugin. The 'select' method of fullcalendar is working fine on the web. I am able to select multiple cell on the month view of the full calendar on web browser. However, on the native android/iPhone app I am not able to select multiple cell(range of dates) of the calendar. All that happens is when I click on the cell to

why event.stopPropagation(); not working on switch?

余生长醉 提交于 2019-12-16 18:05:02
问题 can you please tell me why event.stopPropagation(); not working on switch ? I click on on click it print the row event(console) .It should print only switch console. when I change the switch it print switch console.But when i click on click area it print row event(console). why ? http://jsfiddle.net/k7zJ4/ $(function(){ $('#testSuitConfiguration').click(function () { console.log('pp') }); $( ".selectSequenc_h" ).on( "change", function(event, ui) { //alert('pp') console.log('==') event

How to get checked radio buttons value in jQuery mobile?

左心房为你撑大大i 提交于 2019-12-14 04:19:39
问题 I have a set of radio button groups. How can I get which is checked yes or now for each group and add them to array? Here is what I came up so far: My jquery code: <script type="text/javascript"> $(function () { $("#getinfo").click(function () { $("input[name*=radio-choice-1]:checked").each(function () { alert($(this).val()); }); }); }); </script> and radio buttons <fieldset data-role="controlgroup" data-type="horizontal" data-role="fieldcontain"> <input type="radio" name="radio-choice-1" id=

Phonegap NativeControls not working

感情迁移 提交于 2019-12-14 04:17:04
问题 I've read and followed tutorials on this site or the web on how to add the NativeControls plugin to PhoneGap (Cordova 1.5) with Jquery Mobile. I haven't been able to get the toolbar to work properly. I've tried many different things with no luck. Here is my code: html: <!DOCTYPE html> <html> <head> <!--<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />--> <meta name="viewport" content="width=device-width,initial-scale=1"/> <link rel=

creating 2 popup's programatically(calling 2nd popup from 1st one) in jquery mobile

帅比萌擦擦* 提交于 2019-12-14 04:03:16
问题 I need to create 2 popup's programmatically and each popup should contain one INPUT box and one OK button and one CANCEL button. Upon clicking on the first popup OK button i have to bringup the second popup. I am new to jquery mobile, i looked into many docs but i didnt get proper way to do it. i tried to do it something like this. but didn't worked. var $popUp = $("<div/>").popup({ dismissible : false, theme : "a", overlyaTheme : "a", transition : "pop" }).bind("popupafterclose", function()

Making features of collapsible sets responsive in JQuery Mobile

て烟熏妆下的殇ゞ 提交于 2019-12-14 03:59:11
问题 I am designing an app that works on the desktop, tablets and phones. I have some collapsible content that I want to be inset in the desktop browser and ipad landscape, but not inset in tablet portrait and on phones. I have other responsive elements working correctly, but the following html & CSS are not working: HTML <div id="storagePage" data-role="page" data-theme="a"> <div data-role="collapsible" data-collapsed="false" data-theme="b" data-content-theme="c" class="storage_devices" data

jquery mobile pageshow event is not firing on first page

元气小坏坏 提交于 2019-12-14 03:57:37
问题 I am new to jquery mobile frame work.On my observation i am not able to fire pagebeforeshow event on the first page of my document Could anyone faced the same issue.Please suggest me the steps to trigger the event or any other alternative 回答1: demo http://jsfiddle.net/yNzzG/ In the demo you will see alert when pagebeforeshow handler will get triggered. Rest code will make it clear, hope it helps, code $(document).bind('mobileinit', function() { alert('mobileinit'); }); $(function() { var