Reputation: 3131
I have a query invoice which only updates the total values when a field is altered. As I am generating the invoice items using PHP I really need the values to update as soon as the HTML is generated.
How can I call the update_total function the moment the document has finished rendering?
Thanks,
Tim
Upvotes: 1
Views: 534
Reputation: 8952
This code will run the update_total function as soon as the page has completely loaded.
$(document).ready(function() {
update_total();
});
You can read more on the .ready method here: http://api.jquery.com/ready/
Upvotes: 1