When a site has several tabs with lots of content, loading tab content as they are needed (with AJAX and jQuery) saves bandwidth. An example might be if you are including photo galleries under the tab, with 7 tabs each totalling around 1 MB that could mean 6 MB of wasted bandwidth on each page load.

Comments

blackandcode’s picture

This option would be great to implement!!!!

milittlan’s picture

Be carefull!!!

eXoSaX’s picture

I agree!

Subscribed.

TelFiRE’s picture

Following. Would love to see.

Opensoft’s picture

+1

rogical’s picture

Image gallery/slideshow as a second tab is very common, this would be very useful!

Hydra’s picture

Status: Active » Closed (won't fix)

I like this idea. But this is not what field group ment to do. Field group is in the end a simple theme wrapper. So it does not controle the node load or anything like that. Did you check out the quicktabs module? If this will ever be somehow realized, it won't be in fieldgroup's core.

Marvine’s picture

Hi,

Any news about this improvement (other contrib module) ?

I am really interested by this feature because it can solve some performances issues when we have a lot of groups and fields.

yannickoo’s picture

I also would recommend the Quick Tabs module. You could create a view which display your content.

jason.fisher’s picture

I would like to see 'lazy-loading' of field group tabs to allow the initial DOM to be completed more quickly.

sstedman’s picture

+1 Same use case - multiple image galleries as tabs.

Subscribe.

Andru’s picture

I'd like to see this too, and I found a couple of modules that come close, a tweak might do it.

The Lazyloader module with Field Groups module does only load the image when the tab is opened, including when nodes are displayed as content in Views.

jQuery AJAX Load will ajax load content but requires creating a link as the content under a tab, so on opening the tabbed area you have to then click that link to see the map or other ajax content. What is needed is to make clicking on the Field Group tab that opens this tab also carry out that action.

Quicktabs creates blocks and so will not do what I want, which is to show rows of tabbed content in views, where the clicked tabs in each row either lazyload or ajax load the maps and images that are initially hidden under those tabs.

Andru’s picture

Issue summary: View changes

As said you just need a tweak to make this work with the jQuery AJAX load module, and here is one that worked for me. Having used that module to create a link that will load content via Ajax, you just need a tiny addition to a single js file of the FieldGroups module so that clicking to open a tab also clicks that link. Go to horizontal-tabs.js and add these two lines to the this.link.click(function () function:

var anchor_id =  $('.jquery_ajax_load')[0];
$(anchor_id).trigger('click');

Also to get the image lazyloader module to work properly there you need to add this in that same function:
$("html,body").trigger("scroll");
otherwise the images just load the spinning placeholder gif forever until you actually scroll.