<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">$.fn.extend({
    scrollFx: function (options) {
        var o = options || {},
            t = this,
            ul = t.find(o.ul),
            lis = ul.children(),
            liWidth = lis.first().outerWidth(true),
            allWidth = liWidth * lis.length,
            box = ul.parent(),
            boxWidth = box.width(),
            prev = $(o.prev, this),
            next = $(o.next, this),
            prevdis = o.prevdis,
            nextdis = o.nextdis;

        ul.width(allWidth);

        if (box.scrollLeft() &lt;= 0) prev.addClass(prevdis);
        if (boxWidth + box.scrollLeft() &gt;= allWidth) next.addClass(nextdis);

        t.delegate(o.prev, 'click', function () { 
            liWidth = lis.first().outerWidth(true);
            allWidth = liWidth * lis.length;
            boxWidth = box.width();
            if (!$(this).hasClass("icon-prev-dis")) {
                box.animate({ scrollLeft: '-=' + boxWidth + 'px' }, 500, function () {
                    next.removeClass(nextdis);
                    if (box.scrollLeft() &lt;= 0) prev.addClass(prevdis);
                });
            }
            return false;
        })
        .delegate(o.next, 'click', function () {
            liWidth = lis.first().outerWidth(true);
            allWidth = liWidth * lis.length;
            boxWidth = box.width();

            if (!$(this).hasClass("icon-next-dis")) {
                box.animate({ scrollLeft: '+=' + boxWidth + 'px' }, 500, function () {
                    prev.removeClass(prevdis);
                    if (boxWidth + box.scrollLeft() &gt;= allWidth) next.addClass(nextdis);                    
                });
            }
            return false;
        })
    }
})</pre></body></html>