Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Lift Events JS and CSS
//CSS, needs to be replaced with the appropriate selectors
.block-content__hero {
opacity: 0;
-webkit-transition: opacity 300ms;
(function() {
window.addEventListener('acquiaLiftContentAvailable', function(e) {
console.log('acquiaLiftContentAvailable event occurred. This indicates a rule is published and is the last event in the personalization rendering.');
jQuery('*[data-lift-slot="' + e.detail.decision_slot_id + '"]').css('opacity','1');
window.addEventListener('acquiaLiftStageCollection', function(e) {
console.log('acquiaLiftStageCollection event occurred. This is the end of the Lift lifecycle and should occur whether rules are published or not.');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment