Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Images in slider can't move D:

here is the code I have for the CarouFredSel slider here is the Jquery

jQuery(document).ready(function () {

    "use strict";

    if ($('#slider-carousel').length >= 1) {
        $('#slider-carousel').caroufredsel({
            responsive: true,
            width: '100%',
            circular: true,

            scroll:
                {
                    items: 1,
                    duration: 500,
                    pauseOnHover: false
                },

            auto: true,

            items:
                {
                    visible:
                        {
                            min: 1,
                            max: 1
                        },

                    height: 'variable'
                }
        });
    }
});

here is the razor code

@if(Model.VMRepositorioSlides != null)
{
    <div class="slider">
        @foreach(Slide slide in Model.VMRepositorioSlides.GetSlides())
        {
        <ul class="slider-carousel">
            <li class="img">
                <a href="@Url.Action("Slide", new { idSlide= slide.IdSlide})">
                    <img class="movement" src="~/img/slider/@slide.CoverSlide" />
                    <div class="col-md-6">
                        <h3>@slide.TituloSlide</h3>
                        <p class="texto-slider">@slide.DescripcionSlide</p>
                        <p><span class="rosa-bold">@slide.SpanSlide</span></p>
                    </div>
                </a>
            </li>
        </ul>
        }
    </div>
}

1 Answer

I already solved, the problem was in razor code not in javascript :)