Hello, I want to hide attending people in events. Didn't found in code where it lays so I thought the best way is to remove by simple JS text removal.
I have added delay after site is loaded, find element and remove text I want. But problem it loads different time everytime. So I thought maybe there is somekind of event that I can hook my custom listener?
Example what I did: ```
document.addEventListener("DOMContentLoaded", function(e) { setTimeout(function() { var capacities = document.getElementsByClassName("am-event-sub-info-capacity"); for (let item of capacities) { var price = item.innerText; price = price.slice(0, 11) + price.slice(15,20); item.innerText = price; } }, 2000); });
Hello, I want to hide attending people in events. Didn't found in code where it lays so I thought the best way is to remove by simple JS text removal.
I have added delay after site is loaded, find element and remove text I want. But problem it loads different time everytime. So I thought maybe there is somekind of event that I can hook my custom listener?
Example what I did:
```
document.addEventListener("DOMContentLoaded", function(e) {
setTimeout(function() {
var capacities = document.getElementsByClassName("am-event-sub-info-capacity");
for (let item of capacities) {
var price = item.innerText;
price = price.slice(0, 11) + price.slice(15,20);
item.innerText = price;
}
}, 2000);
});
```
Hello Martynas,
Could you please tell me where exactly do you want to hide this? Thanks!
Attached image to show what exactly I want to hide
Hello Martynas,
Please add this script to the page where you have Amelia shortcode:
And let me know if it worked. Thanks!
Yes it did worked! Thank you!
Great, glad to hear that !
You are welcome.
If you have any other questions or concerns feel free to open a new ticket and we will gladly help,