Q: Function parameter not getting updated inside click event
**Event.js**
// main click event to call
$(document).on('click', '.start', function(){
root.ajax({
url: 'location'
}, function( response ){
root.update( response );
})
});
**Content.js**
var flag = false;
root.update = function( response ){
if(!flag){
// event assignment for new created button
$(document).on('click', '.innerStart', function(){
// first time prints okay but after printing old value always
// response is not getting updated
console.log( response );
});
flag = true;
}
}