CSS jQuery tabs - disable or hide all but 'today' on page load
I have some tabs that work fine and open on the tab corresponding to 开发者_Go百科today - by day of the week. I want to put dynamic content in the 7 day divs but only want todays div to load when the page loads and not all 7 divs as it will slow the page. The content for the other 6 divs should only load when the tab is clicked on.
http://www.hostelcities.com/dev/tabbed_layout/jquerytabs/jquerytab0.1.php
I think that I need to disable the 6 non active divs until clicked on.
I'd appreciate some help.
Thank you.
Update content of the div
via ajax request on tab click:
$('.tabnavigation li a').click(function() {
var id = $(this).attr('href').substring(1);
$.get('ajax/test.html', { day = id }, function(data) {
$('#' + id).html(data);
});
});
Something like this. I've used id's of elements from your page but I didn't have a chance to check it.
精彩评论