Hi, question.
On page show I am invoking a service that displays an amount in cents ie 1000 cents.
I also have an event on page show that runs the following javascript to change the 1000 cents into $10
$('document').ready(function(){
$('[name="amount"]').each(function(){
var v = $(this).text();
try {
v = parseInt(v, 10);
v = v / 100;
v = '$' + v;
$(this).text(v);
} catch(ex){
}
});
});
Although it works when I run the javascript in console its not working on page show.
Im thinking there is a time delay on the invoke service to show the amount (1000) and the javascript runs before that. I could put a time delay on the javascript but I dont want the users to see 1000 and then flick to $10
Any suggestions?
Thanks, Ante