Anasayfaya Çıkar Butonu ile Carousel +++

index.cshtml

@{
    <div class="discus-parallax p-5 bg-white">
        <div class="container">
            <div class="owl-carousel-product2 owl-carousel-fix">
                @foreach (Post comPost in Partial.allPosts.Where(a => a.PostHome == true))
                {
                    <div class="text-center all-text-white">
                        <a href="@Partial.PostLink(comPost.PostID)">
                            <div class="disucs-imageframe">
                                <img src="@comPost.PostThumbnail" />
                                <h3 class="text-center mt-4" style="color:#000;">@comPost.PostTitle.HtmlEncode()</h3>
                            </div>
                        </a>
                    </div>
                }
            </div>
        </div>
    </div>
}

Javascript

$('.owl-carousel-product2').owlCarousel({
                margin: 10,
                loop: true,
                autoplay: true,
                autoplayTimeout: 2000,
                autoplayHoverPause: true,
                nav: true,
                navText: [
                    '<i class="fas fa-chevron-left"></i>',
                    '<i class="fas fa-chevron-right"></i>'
                ],
                dots: false,
                responsive: {
                    0: {
                        items: 1
                    },
                    600: {
                        items: 2
                    },
                    1000: {
                        items: 3
                    }
                }
            });

STANDART JAVASCRİPT ( Aşağıdaki kod ekli ise tekrar eklemeye gerek yok)

<script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript">
    $(document).ready(function () {
        $('.counter').each(function () {
            $(this).prop('Counter', 0).animate({
                Counter: $(this).text()
            }, {
                    duration: 4000,
                    easing: 'swing',
                    step: function (now) {
                        $(this).text(Math.ceil(now));
                    }
                });
        });

// Carouselin JAVASCRİPTi BURAYA EKLENECEK

    });
</script>

http://demo1.karayeltasarim.com/

İndex Bileşenleri