Where to put the .fadeIn(); in this tab-script?
Hi there,
All works fine, but I want to use the
.fadeIn(); option, so that (when I switch tabs) this goes nice and smooth. But where to put this
.fadeIn();?
The code:
- <script type="text/javascript">
- <!-- Tabs -->
- $(function () {
- var tabContainers = $('div.tabs > div');
- tabContainers.hide().filter(':first').show();
-
- $('div.tabs ul.tabNavigation a').click(function () {
- tabContainers.hide();
- tabContainers.filter(this.hash).show();
- $('div.tabs ul.tabNavigation a').removeClass('selected');
- $(this).addClass('selected');
- return false;
- }).filter(':first').click();
- });
- </script>
Thanks!
Kind regards
ps: if anyone knows how to reduce the gabs between the tabs, please let me know too :)