Class: OpacityEffect

plugin.OpacityEffect

new eg.Flicking.plugin.OpacityEffect(selector)

A plugin to add opacity effect attached with flicking interaction.

  • Should be targeted only one element(or a wrapper element having child nodes) per panel.

플리킹 인터렉션에 따른 투명도 조절 효과 플러그인.

  • 각 패널당 한 개의 요소(또는 자식노드를 포함하는 한 개의 래퍼요소)만 지정되어야 한다.
  • selector
    Type: String

    Target element selector string

    대상 요소 셀렉터 문자열

Example
<div id="flick">
    <div><p>panel 0 <span class="text">abc</span></p></div>
    <div><p>panel 1 <span class="text">abc</span></p></div>
    <div><p>panel 2 <span class="text">abc</span></p></div>
</div>
// as namespace usage
new eg.Flicking("#some")
 .plugin([
     // Apply opacity effect to '<span>' selector matched elements
     new eg.Flicking.plugin.OpacityEffect("span")
 ]);

// as ESM import usage
import Flicking from "@egjs/flicking";
import {OpacityEffect} from "@egjs/flicking-plugins";

new Flicking("#some")
 .plugin([
     new OpacityEffect("span")
 ]);
See:
comments powered by Disqus