I have a trouble with my code. I want to do when i click on div that gets some class and after 1 second it removes that class. Here is example of my code:
$(document).ready(function() {
alert('aaa');
$(document).on("click", ".items-layout > div", function() {
var $this = $(this);
$this.addClass('hover-effect');
$this.off("click");
}, function() {
setTimeout(function() {
var $self = $(this);
$self.removeClass('hover-effect');
alert('yolo');
}, 1000);
});