Home Forums Porto Template Usage of array in data- params.

This topic contains 1 reply, has 2 voices, and was last updated by  Support2 3 weeks, 3 days ago. This post has been viewed 72 times

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10030543

    khunshan
    Participant

    Hi. I am an aspiring web developer. I just purchased your awesome theme.

    Going thru the code I am confused and so far unable to identify why are we passing arrays in data-* params.

    For e.g.

    data-width=”[‘325′,’325′,’325′,’550′]”
    data-fontsize=”[’18’,’18’,’18’,’40’]”

    data-voffset=”[‘-65′,’-65′,’-65′,’-98′]”

    What does the value at first, second, third and fourth indexes mean? Does it mean if the device is on mobile then use first value, the browser then second value and so on?

    If you can clarify the reason we are passing 4 params in an array to data-* attributes, I will be grateful.

    Thanks.


    #10030546

    Support2
    Keymaster

    Hello, thanks for your purchase.

    You are right. Each value on the array is for a specific resolution.

    Explaining:
    The Revolution Slider allow to define 4 resposive levels with the option responsiveLevels:

    'responsiveLevels': [4096,1200,992,500]

    * Note this option on the data-plugin-options.
    * This will define the following responsive levels: 4096px until 1200px / 1200px until 992px / 992px until 500px / 500px until 0px

    On the data-attibutes of each slide layer you can define values for each resolution (previously defined on the “responsiveLevels” option). For example you can define different positions with data-x="['100','200','400','500']".

    For example:

    data-x="['100','200','400','500']"

    * 100 will be applied in resolutions between 4096px and 1200px.
    * 200 will be applied in resolutions between 1200px and 992px.
    * 400 will be applied in resolutions between 992px and 500px.
    * 500 will be applied in resolutions between 500px and 0px.

    You can learn more here:

    We hope this helps.

    Kind Regards,

    Rodrigo.


Viewing 2 posts - 1 through 2 (of 2 total)