Breakout.ItemSlider/Views/ItemLayout.cshtml

@{
    Breakout.ItemSlider.Models.SliderSettings options = Model.Options;
 
    Style.Require("breakout.itemSlider.default").AtHead();
    Script.Require("breakout.itemSlider").AtHead();
    
}
 
<div id="@options.Id" class="@options.CssName">
    <ul>
        @foreach (dynamic shape in Model.Items) {        
            <li>
                @Display(shape)    
            </li>
        }
    </ul>
</div>
 
@using (Script.Foot())
{ 
    <script>
        $(function () {
            var settings = {
                speed: @options.Speed,
                delay: @options.Delay,
                keys: @options.Keys.GetValueOrDefault().ToString().ToLower(),
                dots: @options.Dots.GetValueOrDefault().ToString().ToLower(),
                fluid: @options.Fluid.GetValueOrDefault().ToString().ToLower()
            };
 
            $('#@options.Id').unslider(settings);
        });
    </script>
}