Thx again for your reply!
I tried several variations, but nothing worked...
If I use the following code, where I implemented the first code from you below my tab-script in a separate call nothing happens:
<script type="text/javascript" charset="utf-8">
$.noConflict();
$(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>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
tabContainers.hide();
tabContainers.filter(window.location.hash).show();
$('div.tabs ul.tabNavigation a').removeClass('selected');
return false;
});
</script>
I choose a tab (for example tab#3), click on a link, the site reloads I still get displayed tab#1...
2nd version I tried:
<script type="text/javascript" charset="utf-8">
$.noConflict();
$(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>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
tabContainers.hide();
tabContainers.filter(window.location.hash).show();
$('div.tabs ul.tabNavigation a').removeClass('selected');
return false;
});
</script>
Same as before, the site reloads and shows tab#1...
With the third version the tabs are all hidden, I first need to click on a tab to get it displayed...
<script type="text/javascript" charset="utf-8">
$.noConflict();
$(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();
$(document).ready(function(){
tabContainers.hide();
tabContainers.filter(window.location.hash).show();
$('div.tabs ul.tabNavigation a').removeClass('selected');
return false;
});
});
</script>
On click and site-reload the tabs are hidden again...
It would be great if you could take another look at this. I don't know what to do to get this running...
Cheers!