0

在 jquery 文件之上,我定义了所有方法和属性。我想对文件进行更改,因此出于学习目的,我需要知道这叫什么?

  function ImageFlow ()
{   

    /* Setting option defaults */
    this.defaults =
    {
        animationSpeed:     50,             /* Animation speed in ms */
        aspectRatio:        1.964,          /* Aspect ratio of the ImageFlow container (width divided by height) */

        imageFocusMax:      3,              /* Max number of images on each side of the focussed one */
        imagePath:          '',             /* Path to the images relative to the reflect_.php script */
        imageScaling:       true,           /* Toggle image scaling */ 
        imagesHeight:       0.67,           /* Height of the images div container in percent */
        imagesM:            1.0,            /* Multiplicator for all images in percent */
        onClick:            function() { /*document.location = this.url;*/ flipIt(this) },   /* Onclick behaviour */
        opacity:            true,          /* Toggle image opacity */
        opacityArray:       [10,8,6,4],   /* Image opacity (range: 0 to 10) first value is for the focussed image */
        percentLandscape:   118,            /* Scale landscape format */
        percentOther:       100,            /* Scale portrait and square format */
        preloadImages:      false,           /* Toggles loading bar (false: requires img attributes height and width) */
        reflections:        false,           /* Toggle reflections */
        reflectionGET:      '',             /* Pass variables via the GET method to the reflect_.php script */
        reflectionP:        0.5,            /* Height of the reflection in percent of the source image */
        reflectionPNG:      false,          /* Toggle reflect2.php or reflect3.php */
        reflectPath:        '',             /* Path to the reflect_.php script */
        scrollbarP:         0.6,            /* Width of the scrollbar in percent */
        slider:             false,           /* Toggle slider */
        sliderCursor:       'e-resize',     /* Slider cursor type - default is 'default' */
        sliderWidth:        17,             /* Width of the slider in px */
        slideshow:          false,          /* Toggle slideshow */

        xStep:              180             /* Step width on the x-axis in px */
    };

这个叫什么????

4

1 回答 1

0

这些是在加载这个 js 文件时初始化的默认值,除非我们没有在外部重新初始化它们......如果我们调用这个 js 文件,那么默认值将用于加载函数,如果我们调用这个 js使用客户值,那么这些值将被新值替换,并且它们将被进一步处理,

您也可以更改这些值,但请确保您需要遵循数据类型和布尔值等。

于 2013-06-04T09:13:26.350 回答