Message from JavaScript discussions

July 2017


const listItem = $('<ons-list-item modifier="chevron" tappable ripple class="tombolmenu">');

const p = $('<p>');




Message permanent page


$('#datalist').append('<ons-list-item modifier="chevron" tappable ripple class="tombolmenu"><p>'+ el.nama +'</p></ons-list-item>');

i get it, but doesnt know how and where to write .click in this line of code.

— I see, i will try it

— Wait TRGWII is i need to write my whole bukapaket() function inside that; ?

— You CAN do that

— Or a function that calls it

— Wew, this all make me confused,
well, last question, hope you doesnt bothered and can help me TRGWII
i have change the code to this :
function bukapaket() {
document.querySelector('#coreNavigator').pushPage('harga.html');'ons-toolbar .center').innerHTML = el.nama;
console.log("ID dari halaman ini adalah "" , dan Nama dari halaman ini adalah "+el.nama+" , dan ini adalah Halaman Harga");

why that .innerHTML resulted as null but that el.nama appear in console.log ?

Message permanent page

— Uhhh, why use

— And please don't use innerHTML

— Use .textContent

— Erm, is from a mobile framework that i used i think 😅 i doesn't know if that is from native js or customized one.

Message permanent page

— Wait, gonna try that textcontext