Experiences on PHP Programming

Experiences on PHP Programming


Phonegap and jQuery

Posted: 26 May 2014 09:46 PM PDT

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.


Post a Comment