Created
November 28, 2020 15:51
-
-
Save neodigm/0d4d720f306868e8db4e8e2d44028c8f to your computer and use it in GitHub Desktop.
Walk through DOM making all parents position relative - Vue.js method snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Vue.js Method | |
"doHeroClick": function( ev ){ | |
ev.preventDefault(); | |
if( oTopmenu && !oTopmenu.isMobile() ){ | |
var eTarget = this.$refs["pdp_zoom_reveal"]; | |
eTarget = eTarget.parentNode; | |
if( eTarget ){ | |
while( eTarget.tagName !== "HTML" ){ | |
eTarget.style.position = "relative"; | |
eTarget = eTarget.parentNode; | |
} | |
} | |
if( ltdc_reveal ) ltdc_reveal.autoOpen("pdp_zoom_reveal"); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment