On Hompage, If I click on the pop-up review
Then it will show this view product and on clicking it
It is going to the product but not at top. Instead it is directly going to the customer review part of the page. Please help me with this
The button URL is created by the Jdm app, but it’s possible to overwrite it.
Go to “Edit theme” and add a “Custom liquid” section to the Footer section group.
Paste this code:
<script>
window.addEventListener('load', () => {
observer = new MutationObserver((records, observer) => {
for (const record of records) {
for (const addedNode of record.addedNodes) {
if (addedNode.nodeType == 1 ) {
let buttons = addedNode.querySelectorAll('.popup-widget a.jdgm-full-rev__product-button');
for ( let button of buttons ) {
console.log('match!');
button.href = button.href.split('#')[0];
}
}
}
}
});
observer.observe(document.documentElement, {subtree:true, childList:true});
});
</script>
The code will monitor page content and as soon as the popup is shown it will modify the URL of the button to direct visitors to the top of the product page.
It would also suppress the “How would you rate this product?” popup there.
if my post is helpful, please like it ♡ and mark as a solution -- this will help others find it
@tim_1 you want me to add these code in Custom CSS of footer?
Which app are you using ?
JudgeMe app I’m using