tags:

views:

1242

answers:

2

At http://docs.jquery.com/UI/Tabs#Example there is a short HTML example of how to use JQuery UI Tabs.

  • I put the HTML in a local index.htm file.
  • I downloaded all the CSS and Javascript files, and saved them in local files:
  • but the closest I can get is the same example without any color in the tabs.
  • I've looked around for images, etc. but can't find any.
  • I can even have everything local EXCEPT the CSS file which I get off their server and THEN it works, so it is something in the CSS file that I'm not getting.

What am I not copying locally that the online CSS file has? Has anyone gotten this JQuery UI Tabs to work and have a zip file that works locally?

+2  A: 

For the UI tabs to work you NEED some CSS. The documentation states the minimum required.

The problem you have with the example theme is because the css file used references other CSS files. You need to copy them all locally. You also need an image under the themes/flora/i folder.

kgiannakakis
yes, that was it, I downloaded this image and now all works well, thanks: http://ui.jquery.com/latest/themes/flora/i/tabs.png
Edward Tanguay
+2  A: 

If your problem is that everything seems to run but the DIVs do not disappear as they should then you have probably run into the same problem I did.

You need to define the class .ui-tabs-hide so that it hides the element. Basically jQuery uses this to hide the elements, rather than doing it manually with display: none. The reason for this is so that it doesn't mess with your display's default setting, which could be block, inline or anything. By adding and removing the class it gives you a more control.

.ui-tabs-hide
{
  display: none
}
John_