Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "frontend-packages/headless-content-unblocker/src/dom/hijackJQueryEach"

Index

Variables

Const ALREADY_OVERWRITTEN_PROPERTY

ALREADY_OVERWRITTEN_PROPERTY: "hijackQueryEach" = "hijackQueryEach"

Functions

hijackJqueryEach

  • hijackJqueryEach(selectors: string[]): void
  • Allows to delay .each calls on jQuery elements.

    Example when div[block-me] is blocked:

    <div block-me="1" class="my-test">blocked</div>
    <div class="my-test">not blocked</div>
    <script>
    jQuery(() => {
     jQuery(".my-test").each((index, element) => {
       console.log(index, jQuery(element).html());
     });
    });
    </script>
    
    see

    https://api.jquery.com/each/

    Parameters

    • selectors: string[]

    Returns void

Generated using TypeDoc