Answer the question
In order to leave comments, you need to log in
How to add onclick to jquery event?
There is such an event:
jQuery(document).ready(function($) {
init();
$(document).on('click', '.box', function(event) {
$('.box').addClass('active')
setTimeout(function() {
$('.box').removeClass('active')
}, 2500);
});
});
Answer the question
In order to leave comments, you need to log in
It's just a function. Just add her challenge
$(document).on('click', '.box', function(event) {
yaCounterXXX.reachGoal('press-me');
$('.box').addClass('active');
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question