Okay so I have a link that is directed to one website example:
<a href="https://www.google.com">Click me!</a>
So what I want to chnage the href link after the 10th time that is clicked to a different location what ive done is flawed becase it only counts the number of times the link has been clicked since the last reload ex:
var count = 0;
$(document).ready(function(){
$('a').click(function(){
count++;
if(count > 10){
$('a').attr("href","https://www.yahoo.com");
}
});
});
So i need a counter that keeps track of the total times its been clicked not just the times after the page reloads. It needs to keep track of every click from every user because so i dont think cookies would work i may be wrong.