jquery mobile 1.4 + phonegap 3, which button event : click tap vmousedown - jquery-mobile

Hi what are the best practices and fastest events for click events with buttons, links and selects for Phonegap 3.3 and jquery mobile 1.4 ?
Click, tap, vmousedown ?
Thanks

If you are working with jQuery Mobile then it is a vclick.
Unlike tap and click it will work on desktop and mobile browsers alike, and unlike click event this one don't suffer from 300ms delay.
Read my other answer to find out more.
$(document).on('vclick', '#someButton', function(){
});

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.

Back button physical

I work on jquery mobile with phonegap
I would like to detect a click on the physical back button to close my popup.
Currently when I click on that button on a mobile support, it returns me to the page visited previously, I think it only uses the history.
If this is not possible in pure js, then maybe just block this physical button.
Thanks

Navigation Menu in Jquery Mobile

I'm a newbie with jquery mobile but I want to build a vertical navigation panel with its specific animation (no page changing).
A good example is here ( i don't want sencha touch, i need to do this with jquery mobile): http://dev.sencha.com/deploy/touch/examples/production/kitchensink/index.html
For example, if you select "User Interface", just the menu is updating (and a button back appear...)
Another good example is IOs, as the dropbox Ipad application (cf http://www.youtube.com/watch?v=qeqw5OroHzY)
How I can do that with jquery mobile ? I see panels, the 1.3 new feature, but it's not really the same thing ...
Thanks for your help
Try this: jQueryUI's .menu
Other than that, it's just a fancy <aside>

Using Jquery Mobile dynamically generated dialog box opens multiple times

In a multi page template,I have three category pages (comedy, action, drama) that you can swipe between each containing rows of images (Seinfeld, Modern Family, Family Guy, Big Bang). Clicking on an individual image should open a dialog box (Seinfeld summary), close when you click the close button, and stay close. Initially it works, then what happens is based on the number images click after two, it opens and closes n -1 (clicking the 3rd image, opens the dialog box twice).
what could be the reason behind this?
Without your code I can be sure but I think I understand what is happening to you.
You have a problem with multiple event binding. Because of jQuery Mobile architecture it is possible to bind an event numerous time to some object.
I have an blog ARTICLE on jQuery Mobile page events handling and there's a chapter dedicated to this problem, just search for the chapter Prevent multiple event triggering. Or it can be found HERE.
In few words always unbind event before you bind it to some object to prevent this from happening:
$('#test-button').die('click').live('click', function(e) {
alert('Button click');
});

How can I modify the browser control for phonegap in iOS to have menu buttons?

I have a PhoneGap application in iOS to display a web app. I want to modify the browser control that is displaying the web app to have a few buttons at the bottom that function as "back" "forward" "refresh" etc. is this possible? Do I need to use a plugin?
I suggest using html to implement those buttons, which is pretty easy with javascript. Since it's not performance-critical, doing this with native code is unnecessary.
I don't know any plugins for what exactly you want, but I have used the android version of this iOS ChildBrowser plugin which provides a pop-up browser with "back", "forward" and "refresh" buttons. It's quite convenient for browsing external web pages.

Resources