I want to get the title for
var myApp = new Framework7({
modalTitle: 'My Title'
How could I get it thorugh ajax?
Alternatively, I tried to set the title for myApp.alert with a global variable:
var title;
test_ajax( function(data) {
title = data.pagename;
})
But Ajax always runs later than the previously defined variable and I get “undefined”. Whats the right way?