How to pre-load all tabs by default with jQuery
If I have 4 tabs where the first 2 are loaded with ajax and the last 2 are static, how do I pre-load the 2 ajax tabs by default? For the moment, only the first tab is automatically loaded, the second one is loaded when clicked. I want them both to be loaded so that when I click the second one, the content is already loaded. I tried to call the load event on the second tab like this: $(document).ready(function () { $("#main-tabs").tabs({ cache: true }); $("#main-tabs").tabs("load", 1); }); And this loads the second tab, but for some strange reason, the first one doesn't load at all; not even