$(document).on('pagecreate', "#home", function(){
$("#doLogin").on("tap", function(event){
$.ajax({
url: config.baseurl+"android/login.php",
success: function(response){
/******************************
* log a new page
******************************/
//$.mobile.pageContainer = $("#home").pagecontainer();
$( ":mobile-pagecontainer" ).pagecontainer(
"change",
"../www/modules/dashboard/dashboard.html",
{
role: "page",
allowSamePageTransition: false
}
);
/*********************************
* code for panel swipe
*************************************/
//$("[data-role='panel']").panel();
$(document).on( "swipeleft swiperight", "#dashboard", function( e ) {
// We check if there is no open panel on the page because otherwise
// a swipe to close the left panel would also open the right panel (and v.v.).
// We do this by checking the data that the framework stores on the page element (panel: open).
if ( $( ".ui-page-active" ).jqmData( "panel" ) !== "open" ) {
if ( e.type === "swipeleft" ) {
$( "#right-panel" ).panel( "open" ,{animate:true});
} else if ( e.type === "swiperight" ) {
$( "#left-panel" ).panel( "open" ,{animate:true});
}
}
});
/* coe for camera */
$(function(){
function camSuccess(imgData){
$("#img_camPH").attr("src", imgData);
}
function camError(error) {
console.log(error);
}
function camAccess(event) {
console.log("hello");
var options = {
destinationType: Camera.DestinationType.FILE_URI,
source: Camera.PictureSourceType.CAMERA
}
navigator.camera.gePicture(camSuccess, camError, options)
}
$("#btn_camera").on("tap", function(){
console.log("milk");
});
});
},
error: function(request, error){
}
});
});
});
I get error as soon as i tap on button
Handling of 'touchmove' input event was delayed for 1482569436684 ms
The code