Disable jquery mobile in non touch devices for swipe - jquery-mobile

In one of our application we wanted to have a swipe behavior for tablet so we added jQuery mobile ui for that . In result the swipe worked for non touch devices as well. Now few days after we realised that it is causing pain to users and now we wants to stop it for desktop but available for tablet . Is there a way in Api to achieve this?

Related

How to make JQuery Draggable in Meteor work with touch devices?

I am learning Meteor and JQuery and created a project in Meteor that uses JQuery UI Draggable. This works fine in Desktop Browsers. I assumed that it would work in Mobile devices when dragged with fingers but it isn't (thats why we have JQuery Mobile). Is there anyway I can create a application that works in both Desktop browsers and be able to use it mobile. This might be a silly basic question but I don't know how to progress. Would appreciate some directions
Could that be of some use to you?
Basically, it should translate touch events such as tap in mouse events such as click.

iOS Smart app banner with jquery mobile

I am trying to use the iOS smart app banner on my website. I am currently using jquery mobile 1.3.1 for development. The problem I'm having is jquery mobile automatically hides the address bar on page load. Since the smart app banner appears to be a part of the address bar, the user cannot see the smart app banner unless they scroll up. Is there anyway around this problem? Ideally the page would load and show the smart app banner and not the address bar. However, at this point I would be fine showing both on page load. I know the folks over at HTML5 Boilerplate have solved this issue. See:
Hiding address bar without hiding the smart app banner on iOS 6
The problem with this solution for me is turning off the hide address bar feature in jquery mobile. I can't seem to figure out how to accomplish without altering the jquery mobile core code. I don't really want to alter the jquery mobile code. Mainly because I don't like changing code that I have to update when a new version comes out. Plus I am pulling the jquery mobile file from jquery's CDN. I would like to find another way to solve this problem. Any ideas? Thank.
Add
window.oldScroll = window.scrollTo;
window.scrollTo = function(){return false;};
before you load jquery mobile. This will override Jquery mobile hiding. then you can use the helper.js by reassigning scrollTo after jquery mobile script.

jquery mobile transitions effects are weird on ipad

jQuery Mobile page transition effects on any button click or any event are looking weird. What should I do to make it feel better?
Do they seem to flicker a bit?
If so, there's a discussion here:
jQuery Mobile blinking at page transitions on iPad
on the topic of the iPad transition flicker.
Seems an upgrade to iOS 5.0 may solve the problem. Also, if you are running it as an app, try in Safari. The bug was supposed to have been fixed in Safari.

How to enable iframe scrollbar on iOS safari

I am trying to implement facebook's live stream plugin on my website. I see that there is a scrollbar on pc and mac browsers, but not on iphone or ipad safari. I think it is because iphone and ipad treat scrollbar differently since they are both touch based devices. So I expect to scroll iframe with two fingers, but it does not work either.
Here is sample page (used a different src url) http://para.qacode.com/test.php
How do I enable two finger scrolling or normal scrollbar on ios safari?
On iOS versions prior to 5, you can scroll iframes on iPad/iPhone using two fingers, but this is a bit of a hidden feature and most people don't know about it. I'm not sure why tow-finger scrolling isn't working for your iframe - perhaps there is some JavaScript intercepting the touch event?
On iOS 5 this has been fixed and scrolling works as expected for iframes with one finger.
If you need to scroll a sub-region of the page on iOS 4 and earlier, the best bet is to use a library such as iScroll that implements scrolling with JavaScript touch-event handling.
Apply these styles to the parent container:
-webkit-overflow-scrolling:touch;
overflow:auto;

Using touch events instead of mouse events on Safari, Firefox and Chrome

Is there a way/addon/extension that simulates the mobile events (touchstart, touchmove, touchend) instead of the normal mouseevents when navigating with Safari, Firefox or Chrome?
I'm trying to test some websites on iPad. If there is a iPad Emulator desktop software, would be great also, but I need some kind of Firebuging.
Thanks!
CaioToOn!
You realize there is in fact an iPad simulator, which you get when you install Xcode? (Which is free, sign up at developer.apple.com.)
Try Phantom Limb
http://www.vodori.com/blog/phantom-limb.html
You should have a look at the tom robinson's virtual light table. It includes a small but working mobile events emulator in javascript.
You can test touch input directly in your browser.
In Firefox or Chrome press Ctrl+Shift+m, which gives you a mobile view of your webpage. There you can also check if the scaling is correct.
There is a button, that lets you simulate touch events instead of mouse events.
For further information look at the chrome device mode.

Resources