How to do execute a JavaScript function after your html elements have been loaded onto the page? For example if i want to call a function but only after the html in the page is load how will I call it?
$(function() {
// Your code here
});
You can get to this from http://docs.jquery.com
ok so I have a function called events would I do this $(function() {
events();
});
Lastly if am using jquery mobile I can create several pages within the same document using <div data-role=“page” data-add-back-btn=“true” id=“venues”> how can I call another js functional called test(); within that page?
From the jQuery mobile events page it seems that the pageshow event may be what you’re after.
Actually am using a pageinit handler which seems to be working not sure if thats the way to go though
Yes, that’s good. That’s the recommended one to use.