1. Home
  2. Knowledge Base
  3. Codex
  4. JS API
  5. JS Filters
  6. applyFilters( “push_fixed_elements_{edge}” )

applyFilters( “push_fixed_elements_{edge}” )

applyFilters( "push_fixed_elements_{edge}", selectors, edge );

Filters the selectors of fixed elements on the page that need to be pushed inwards with the content.

The dynamic part of the filter name is the edge that’s pushed (top/right/bottom/left).

The default selector-list for the top/left/right edges contains the fixed header element, as that needs to be pushed down/left/right. The bottom edge has an empty selector array.

Params

selectors array, required
List of CSS selectors.
edge string, required
The edge that is pushed, either top/right/bottom/left.

Returns

A list of CSS selectors that should be pushed with the content.

Examples

// Also push the element #my-fixed-element down, when that element is present.
DiviArea.addAction('push_fixed_elements_top', function(selectors) {
  selectors.push('#my-fixed-element')
  return selectors;
});

Notes

No notes

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Get in touch with us