Thanks for the explanation. Are you saying I can't use
$(document).ready(function
// put all your jQuery goodness in here.
});
with this particular function?
If not does could I perhaps use a timer event to prevent the jQuery undefined error in IE that is being caused by other script(s) that are higher on the page taking so long to load?
Because when I attempt to use the following function I get an object expected error and the lines being referenced are each of the <a onclick="tab_change('image
Main Topics
Browse All Topics





by: hieloPosted on 2008-05-22 at 21:30:42ID: 21629432
You are defining function tab_change WITHIN the function that is executed as soon as the document is ready for DOM manipulation. Basically tab_change is "trapped" within the anonymous function executed by the ready event and as soon as that is done executing, tab_change is no longer visible. You need to define tab_change "outside/indepent of" the anonymous function that is being executed by the ready event.
In case you are wondering what that anonymous function is, basically you are executing this:
jQuery(document).ready( function(){...} );
the function(){...} IS the anonymous function, and in what you currently have you are defining tab_change where the ... are. It does NOT exist outside of that function. That's why when you click on the tabs the function is not found (Hence the reason for the "Object expected" error in IE.
Select allOpen in new window