Jssor滑块过渡

Jssor slider transitions(Jssor滑块过渡)
本文介绍了Jssor滑块过渡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Jssor滑块上实现过渡效果,但我不确定将选项放置在哪里。

网站有我使用的转换代码生成器,但无论我将代码放在哪里,滑块都不使用转换。

这是我当前的尝试:

<script type="text/javascript">
        jQuery(document).ready(function ($) {
            var options =
            {
                $DragOrientation: 3,
                $AutoPlay: true,
                $SlideDuration: 1500,
                $AutoPlayInterval: 4500,
                $SlideshowOptions: {
                    $Transitions: { $Duration: 600, $Delay: 50, $Cols: 8, $Rows: 4, $FlyDirection: 5, $Formation: $JssorSlideshowFormations$.$FormationZigZag, $Assembly: 1028, $ChessMode: { $Column: 3, $Row: 12 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2 }
                }
            }
            var jssor_slider1 = new $JssorSlider$('banner_slider', options);
        });
    </script>

推荐答案

我设法找到了一个工作示例并找到了正确的格式:

<script type="text/javascript">
    jQuery(document).ready(function ($) {
        var _SlideshowTransitions = [{
            $Duration: 600,
            $Delay: 50,
            $Cols: 8,
            $Rows: 4,
            $FlyDirection: 5,
            $Formation:
            $JssorSlideshowFormations$.$FormationZigZag,
            $Assembly: 1028,
            $ChessMode: { $Column: 3, $Row: 12 },
            $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseOutQuad },
            $Opacity: 2
        }];
        var options = {
            $DragOrientation: 3,
            $AutoPlay: true,
            $SlideDuration: 1500,
            $AutoPlayInterval: 4500,
            $SlideshowOptions: {                                //Options which specifies enable slideshow or not
                $Class: $JssorSlideshowRunner$,                 //Class to create instance of slideshow
                $Transitions: _SlideshowTransitions,            //Transitions to play slide, see jssor slideshow transition builder
                $TransitionsOrder: 1,                           //The way to choose transition to play slide, 1 Sequence, 0 Random
                $ShowLink: 2,                                   //0 After Slideshow, 2 Always
                $ContentMode: false                             //Whether to trait content as slide, otherwise trait an image as slide
            }
        };
        var jssor_slider1 = new $JssorSlider$("banner_slider", options);
    });
</script>

这篇关于Jssor滑块过渡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Update another component when Formik form changes(当Formik表单更改时更新另一个组件)
Formik validation isSubmitting / isValidating not getting set to true(Formik验证正在提交/isValiating未设置为True)
React Validation Max Range Using Formik(使用Formik的Reaction验证最大范围)
Validation using Yup to check string or number length(使用YUP检查字符串或数字长度的验证)
Updating initialValues prop on Formik Form does not update input value(更新Formik表单上的初始值属性不会更新输入值)
password validation with yup and formik(使用YUP和Formick进行密码验证)