Skip to Content
Scrollsequence v2 🎉 Alpha dev preview 🎉
V2Advanced Use

Advanced Use

There is a global Javascript object called ScrollsequenceManager that contains all the blocks and their data.

You can use this object to access the blocks and their data, for example:

// Read all Scrollsequence related instance data on the page console.log(ScrollsequenceManager.instances) // Read all the files and their loading status console.log(ScrollsequenceManager.fileManagerGlobal)

Another example of how to access the blocks and their data is by using the following methods:

// Create a new block instance by passing the block element // useful when adding new DOM elements and wanting to make them dynamic ScrollsequenceManager.createBlock(element); // Retrieve a block instance by passing the block element ScrollsequenceManager.readBlock(element); // Update a block by passing the block element // useful after updating the data-attributes of the block element ScrollsequenceManager.updateBlock(element); // Destroy a block by passing the block element ScrollsequenceManager.destroyBlock(element);

This will return the block instance that you can use to manipulate the block further.

Last updated on