I am using Worklight 6.2.
I have written following jQuery mobile code to open a panel:
$(document).ready(
function() {
$("div[data-role='page']").on("swipeleft", function(){
openPanel();
});
function openPanel(){
$('#navpanel').panel("open");
}
However, the panel is getting opened only when I swipe left twice. I have written this code in index.html file in document.ready() block.
Works fine for me by following the below.
That is, only 1 swipe is required to display the panel.
Changed the BODY
in common\index.html to:
<div data-role="panel" id="mypanel" data-display="push">
my panel
</div>
Changed common\js\main.js to:
function wlCommonInit(){
$("div[data-role='page']").on("swipeleft", function(){
openPanel();
});
}
function openPanel(){
$('#mypanel').panel("open");
}
Tested on iPhone 5s + iOS8.