Reputation: 145
I tried to find dome duplicates of this question, and there are other threads with the same or with similar questions, but none of these threads include an actual solution.
What I'm trying to achieve is:
Is it possible that there's no way to achieve this incredibly simple manual status update? Because, as far as I see at the moment, it's possible. Which is just really unbelievable in 2023...
Please correct me, tell me that I'm wrong, and let me know the secret of manually unhover/unfocus/etc... links on mobiles.
Upvotes: 0
Views: 29
Reputation: 14044
I'm going to answer what I think you're asking, but it's difficult to know without code...
<a href="somewhere.html">Link</a>
If that is true, try this:
<a href="somewhere.html" class="white">Link</a>
<style>
.white{color:'white'}
.purple{color:'purple'}
</style>
<script>
$(document).ready(function(){
$('.white').on('click',()=>$('.white').attr('class','purple'))
$(document).on('scroll',()=>$('.purple').attr('class','white'))
})
</script>
Upvotes: 0