Sign inSign up

FullScreen Full-Screen Slider Plugin for Mobile Devices

Add-ons
2026-07-25 23:01 5 views • 0 downloads 41.1KB
FullScreen Full-Screen Slider Plugin for Mobile Devices

Usage

Create an instance and pass the wrapper element (e.g., document) and the 2D parsing object as parameters, as shown below.

1
2
3
4
5
6
7
const fsSlider = new FullscreenSlider(
document,
{
x: window.innerWidth,
y: window.innerHeight
}
);

Bind the resize event. You should run the reset method before running the resize method to properly set the resolution of the section elements. Additionally, you should pass an object containing the window dimensions to the resize method to resize these sections to full-screen dimensions.

1
2
3
4
5
6
7
8
9
window.addEventListener('resize', () => {
fsSlider.reset();
fsSlider.resize(
{
x: window.innerWidth,
y: window.innerHeight
}
);
});

To start the animation, call the start method.

1
fsSlider.start()