Hide current active post fro slider!!!
-
Hi Team,
Thanks for the awesome plugin, I just need a little help that is there anyway I can hide the post which i’m currently viewing. I have embeded the slider in my post page, the slider should show rest of the post but not the one i’m currently on. I’ve tried a jquery solution but it just mess up the slider.
var currURL = window.location.href;
jQuery(“#sp-post-carousel-219 > .slick-list > .slick-track”).find(“a”).each(function() {
var thisURL = jQuery(this).attr(“href”);
if(jQuery(this).attr(‘href’) === currURL || jQuery(this).text() === currURL) {
jQuery(this).parents(‘.sp-pc-post’).remove();
}
});
- The topic ‘Hide current active post fro slider!!!’ is closed to new replies.