Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ridhof/1141941ccd0f15bfc32f0449084ae6f7 to your computer and use it in GitHub Desktop.
Save ridhof/1141941ccd0f15bfc32f0449084ae6f7 to your computer and use it in GitHub Desktop.
$$(document).on('page:init', function(e, page) {
if(page.name == "about") {
//app.dialog.alert('Welcome to About', 'Welcome');
var about_id = page.router.currentRoute.params.aboutid;
$$(".about-js").html('<div class="block"><h1>Diubah via DOM7 dengan id ' + about_id +'</h1></div>');
//app.dialog.alert($$(".about-js").html());
//$$(".about-cotent").html('<div class="block"><h1>Diubah via DOM7</h1></div>');
}
else if(page.name == "cart"){
$$('.qty').on('keyup keydown change', function(e) {
var quantity = $$('.qty').val();
$$(".subtotal").html('Rp. ' + (4500 * quantity));
});
}
});
@bryanChLie
Copy link

Mantuls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment