Not able to see alert on button click or after performing action


#1

JS CODE

var app = new Framework7();
var $$ = Dom7;
$$(’.alert-text-title’).on(‘click’, function () {
app.alert(‘Here goes alert text’, ‘Custom Title!’);
});

HTML Code


#2

And is this element in DOM on app load?

I guess no, then use this instead

$$(document).on('click', '.alert-text-title', function () {
  app.alert(‘Here goes alert text’, ‘Custom Title!’);
});

#3

yess…it is working… Thanks