0
저는이 함수를 호출합니다.함수가 정의되어 있지 않습니다. 코드 바 앱
$(document).ready(function() {document.addEventListener("deviceready", onDeviceReady, false);}
function onDeviceReady() {
function JustCall(phonenr)
{
window.plugins.webintent.startActivity({
action: window.plugins.webintent.ACTION_CALL,
url: phonenr
},
function(){alert('success');},
function(e){alert('error');});
}
JustCall("tel:5582001");
}
이 간단한 호출이 작동하지만, 이것을 사용하면 실용적이지 않습니다.
function onDeviceReady() {
function JustCall(phonenr)
{
window.plugins.webintent.startActivity({
action: window.plugins.webintent.ACTION_CALL,
url: phonenr
},
function(){alert('success');},
function(e){alert('error');});
}
$(document).on('click', '.view', function(event) {
console.log("DEBUG - Trying to access view");
loadRecord();
$(':mobile-pagecontainer').pagecontainer('change', '#view-vendor', {
transition: 'slidedown',
changeHash: true,
reverse: false
});
});
function loadRecord() {
$("#CallNow").attr("onclick", 'JustCall("tel:5582001")');
$("#CallNow").attr("class", "ui-btn").trigger('create');
}
<a href="" id="CallNow" class="ui-btn">Call</a>
}
JustCall은 정의되지 않았습니다. 내가 뭘 잘못하고 있니?
신선한 눈으로 감사드립니다. –