So, I need to hide a duplicated entry when the 'All sectors' filter is selected but and drag the last entry to cover up the hole it leaves. I made this snippet of code below to do the described action. But it only works when ran from the browser console, it seems to ignore my instructions when put into the js file. I tried putting it in different places throughout the document but i've had no luck so far.
Snippet:
if (window.location.hash == '' || window.location.hash == '#'){
accuGroup = $('a[href*="/en/company/accurate-group/"]').parent().hide()
topval = accuGroup.css('top');
leftval = accuGroup.css('left');
lastArticle = $('article:last-child')
lastArticle.css('top', topval);
lastArticle.css('left', leftval);
} else {
accuGroup = $('a[href*="/en/company/accurate-group/"]').parent().show()
}
You can find a live version here: https://novacap.test.whynotblue.com/en/company/
Additionally, you can find the entirety of the Javascript document here: https://novacap.test.whynotblue.com/js/main.js?202203021656