Tuesday, May 27, 2014

Phonegap and jQuery

We have developed an iPhone app using phonegap and jquery. As expected, we have performance issue. Our app is a one html page app and everything is being manipulated by javascript using jquery. It seems that binding an element to an event is the one causing the lag on the app. I have added an unbind first before I bind the elements to an event to clear previous binds. This seems to work.

Here is a sample of unbind code:
$("#mylink").unbind('click'); // add this code first
$("#mylink").click(function(){
    // code here
});

Hope this can help you speed up your phonegap apps with jquery.

1 comment:

Softwin IT Solutions - Belgaum said...

great idea. It should work perfectly. Thanks for your efforts and providing the useful script for Mobile apps development.