I have a javascript that I want to load when the user has clicked two times on my website. I have no clue how to this.
Any suggestions?
Thanks!
I have a javascript that I want to load when the user has clicked two times on my website. I have no clue how to this.
Any suggestions?
Thanks!
$(function(){
var count = 1
$(document).click(function(){
if(count<=2){
count+=1;
}
else{
alert("already clicked two times");
}
});
})
this will start showing the alert after the 2nd click. You can write the code to load the javascript instead of this alert.