• Resolved Nikodemsky

    (@nikodemsky)


    Hi,

    i’m trying to use slick carousel with tabs, but unfortunely slick doesn’t really get along with display:none rule for inactive tab, because it can’t get width for init. Is there some kind of simple fix for it?

    Link with example:
    artzone.w3wg.com/realizacje/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author cubecolour

    (@numeeja)

    This is not a supported function, but if your carousel has a function that can be called to reload the content, you could try adding a script where this is attached to to a jquery click event for each tabs

    eg:

    
    jQuery(function($){
    	$("body").on("click", "#tablist1-tab1, .responsive-tabs__heading:nth-of-type(1)", function() {
    	alert("Replace alert with reload function");
    	});
    });
    
    Thread Starter Nikodemsky

    (@nikodemsky)

    Thanks, i was not sure for the trigger, so i added li classes just in case, my code at the end:

    jQuery(document).ready(function( $ ){
    	$("body").on("click", "[id^=tablist1], .responsive-tabs__heading:nth-of-type(1), .responsive-tabs__list__item", function() {
    	$('.projects').slick('setPosition', 0);
    	});
    });

    and it works splendid 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘tabby + slick’ is closed to new replies.