Trouble with loading jquery onload.
Posted
by Darcy
on Stack Overflow
See other posts from Stack Overflow
or by Darcy
Published on 2010-05-07T16:02:43Z
Indexed on
2010/05/07
16:18 UTC
Read the original article
Hit count: 347
Hi guys,
I'm trying to build some jquery tabs based on the request (which is stored in a table).
I have two pages sharing one .js file. One page is for the user to create the request, and the other is for the administrator to approve/deny the request.
On the admin page, here is my javascript code:
$(function() {
GetRequest();
});
Which is just calling a function I have inside my .js file.
All the code in the .js file is also wrapped in a '$(function(){ //...code here })'.
The problem is the function isn't built yet when calling it from the page. Is there a way I can tell the page to wait until the script is complete?
© Stack Overflow or respective owner