this is the code that I'm using for it:
<script>
document.addEventListener('DOMContentLoaded', function () {
// Find the first .portfolio-hover-item and set data-active to true
var firstPortfolioItem = document.querySelector('.portfolio-hover-item:first-child');
if (firstPortfolioItem) {
firstPortfolioItem.setAttribute('data-active', 'true');
}
});
</script>