I'm developing an app with PhoneGap and jQuery Mobile. It is truly killing the performance of application.The only reason I'm using jQuery Mobile is because of the swipe lateral menus.
There is any simple library that does that implementation correctly? I only found jQuery Mobile related things.
Thanks in advance!
I'm developing an app with PhoneGap and jQuery Mobile. It is truly killing the performance of application.The only reason I'm using jQuery Mobile is because of the swipe lateral menus.
There is any simple library that does that implementation correctly? I only found jQuery Mobile related things.
Thanks in advance!
Share Improve this question edited May 15, 2013 at 4:18 mpatel 4863 silver badges13 bronze badges asked May 15, 2013 at 4:07 udexterudexter 2,34710 gold badges42 silver badges58 bronze badges3 Answers
Reset to default 14You can try these two projects as well
https://github.com/jakiestfu/Snap.js
http://www.berriart.com/sidr/
Here is a cool one written using Javascript. You can try this:
https://github.com/boxbreakout/menujs
Yes,You are right,They are causing many performance issues for the application mainly,
1.Due to the fact that there are transitions effects for whenever we swipe something or change the current Page.Every mobile devices are not compatible enough for the transitions.So,to make it working smooth apply transitions to none everywhere in your application.
Apply this into your index.html page.In head tag.
<script>
$(document).on("mobileinit", function()
{
$.mobile.defaultPageTransition = 'none';
}
</script>
or
you can apply data-transition="none"
into your application.
I have similar issue in past.But this solution worked for me.
2.I don't know any javascript library.but i have one solutions for this.Take one div and make it hide/show on mousemove/touchmove
or swipeleft/swiperight
events of jQuery Mobile.You can set the CSS of the div to show/hide anywhere in your page.
Here is the link for the number of events of jQM. jQM Events
e.g.
<div id="xyz">
</div>
<a data-role="button" id="abc" href="#" data-theme="c" >Swiperight</a>
in javaScript
$('#abc').on('swipeleft',function()
{
var div = $('#xyz');
div.show();
}
Hope i have answered your question as per your requirements.