The first thing you need to do is add display:none;
to your CSS for both #thover
& #tpopup
so they are hidden by default.
Next you will want to use JS to find the URL of the page you are on and store this in a variable you can test against to determine if the pop-up should show.
Add the following to the jQuery function:
const pageURL = window.location.href;
Wrap everything else you already have in a conditional that checks if the page is Home:
if (pageURL === 'http://www33.ecoar.com.br/'){
...
}
Inside the conditional, add the following line of jQuery to show the pop-up when true:
jQuery("#tpopup, #thover").show();
The new completed JS for ‘popup.js’ will be:
jQuery(document).ready(function () {
const pageURL = window.location.href;
if (pageURL === 'http://www33.ecoar.com.br/') {
jQuery("#tpopup, #thover").show();
jQuery("#thover").click(function () {
jQuery(this).fadeOut();
jQuery("#tpopup").fadeOut();
});
jQuery("#tclose").click(function () {
jQuery("#thover").fadeOut();
jQuery("#tpopup").fadeOut();
});
}
});