Skip to content

Latest commit

 

History

History

Modal Lightbox Observe Changes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Modal Lightbox Observe Changes

Synopsis

Observe changes to the modal lightbox and call custom callbacks as nodes are added to the DOM.

Version

  • 0.1.1

SS Versions

  • 7.1

  • 7.0

v7.1 Fluid Engine Compatible

  • Not Applicable

Dependencies


Install

  • Options

    • Page Specific

      • This option will be the one most will want to use if you have only a single page you want to have this effect.

      • Add code from file modal lightbox observe changes.html to Page Settings > Advanced > Page Header Code Injection for the page. Please see Per-page code injection. Read the code for any instructions within.

    • Site-wide

      • This option is the one you want to use if you have multiple elements such as a store page and product blocks where you want to have this effect.

      • Add code from file product quick view observe changes.html to Website > Pages > Website Tools > Code Injection > FOOTER. Please see Add code to code injection. Read the code for any instructions within.

  • Add your callback names to the code.

Callbacks

Your callbacks must accept a node as a parameter.

Following is a very generalized example of a callback. The callback(s) must be defined before the code of this effect. Note the use of var.

<script>

  var mlocNodeAddedLog = ( node ) => {
  
    console.log ( 'mlocNodeAddedLog : ', node );
    
    };
    
  </script>

Note

This code is a base for other effects.

Make a Donation

Please consider making a donation.

Changes

  • 2024-05-23

    • minor tweaks, no functional changes
    • bumped version to 0.1.1
  • 2024-05-01

    • initial version