Initialization Function scrollToTopOfSlot()

protected final function scrollToTopOfSlot(
$scrollToTop = true
)

Summary

Allows you to scroll the Visitor's view to the top of a Slot when a Plugin in that Slot is reloading via AJAX, or to stop any scrolling.

Where You Can Use It

Can be used in your plugin's init() method, from Zenario 7.0.0 onwards.

Description

The API functions that cause a Slot to reload via AJAX, such as refreshPluginSlotAnchor(), have parameters that control whether or not the Visitor's view should scroll to the top of the Slot when the contents of the Slot are changed.

During your initialization method you have the option to change/override this behaviour by calling this function.

Parameters

$scrollToTop

Set to true to scroll the Visitor's view to the top of the Slot, or set to false to ensure that the Visitor's view does not scroll.