I need your help on jQuery | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I need your help on jQuery

I have been working on this stuff for days now..... I want to count the number of times a user click my WhatsApp button on my website..... When it gets to 20 I will then display a new button to a webpage and hide the button to my WhatsApp..... I tried using onclick with JavaScript....But as soon as my WhatsApp loads and I come back it will just start from 0 again I was advised to use cookie I am still trying till now https://code.sololearn.com/WnyOETUDRFCP/?ref=app 👆👆 That's the link to the code ... Please help

19th Aug 2021, 9:15 PM
Ikuobase Wisdom Ewaensetin
Ikuobase Wisdom Ewaensetin - avatar
2 Answers
+ 3
To make it simpler you could save the variable in the browsers local storage so it will not reset every time you reload the page
19th Aug 2021, 10:30 PM
Pieter Edwards
Pieter Edwards - avatar
20th Aug 2021, 7:00 PM
Ikuobase Wisdom Ewaensetin
Ikuobase Wisdom Ewaensetin - avatar