Answer the question
In order to leave comments, you need to log in
How to initialize slick in ajax?
When loading blocks via ajax and when clicking on them, a block with a slider is shown, images are not displayed in the slider at this moment.
Here is a part of the code with ajax in which I inserted the js code responsible for displaying the block with the slider
}).success(function(posts){
page++;
$("#ajax-posts").append(posts).slideDown('show'); // CHANGE THIS!
$("#more_posts").attr("disabled",false);
$("#more_posts").find("i").hide();
jQuery('.sect_2_catalog a').on('click',function(){ ----- ЭТО ПРОИСХОДИТ КЛИКЕ ПО КНОПКЕ, КОТОРЫЙ ОТКРЫВАЕТ БЛОК СО СЛАЙДЕРОМ
var scroll_el = jQuery(this).attr('href');
if (jQuery(scroll_el).length != 0) {
jQuery('.style_categor').slideUp(800);
jQuery('.displFlex_none').addClass('acti');
jQuery(scroll_el).slideDown(800);
jQuery('html, body').animate({ scrollTop: jQuery('.displFlex_none.acti').offset().top - 80 }, 1000);
}
return false;
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question