سؤال

In Maine Jan turns to understand how to fix this bug.

jQuery.noConflict - if you remove, then everything works fine, except thumbnailScroller. how to fix it?

<script>

    function getItems() {
        alert('getItems1');

        $.get("/Product/Index", null, ajaxItems);
        alert('getItems2');
    }
    function ajaxItems(item) {
        alert(item);
        $("#index_items").replaceWith(item);
    }
</script>

<div id="create_form">
@Html.Action("Create", "Product")
</div>

@Html.Action("Index", "Product")


<script>

    jQuery.noConflict();

    (function ($) {
        window.onload = function () {
            $("#tS2").thumbnailScroller({
                scrollerType: "clickButtons",
                scrollerOrientation: "horizontal",
                scrollSpeed: 2,
                scrollEasing: "easeOutCirc",
                scrollEasingAmount: 600,
                acceleration: 4,
                scrollSpeed: 800,
                noScrollCenterSpace: 10,
                autoScrolling: 0,
                autoScrollingSpeed: 2000,
                autoScrollingEasing: "easeInOutQuad",
                autoScrollingDelay: 500
            });
        }
    })(jQuery);
</script>
<script src="@Url.Content("~/Scripts/jquery.thumbnailScroller.js")"></script>
هل كانت مفيدة؟

المحلول

Remove jQuery.noConflict(); and move

<script src="@Url.Content("~/Scripts/jquery.thumbnailScroller.js")"></script>

above your inline <script> tag.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top