I am trying to add and remove a class on click event, it is something like highlight an element, but nothing is happing here :(. Here is my code: JQ:
var listed=($('.vis').size())-1,
btn=$('.compare-btn');
listed < 5 ? listed>=2?btn.show(500):null):btn.text("more").addClass('border').setTimeout(btn.removeClass('border'),2000);
CSS:
.border{border:2px solid red;width:95%!important;}
please let me know what is wrong with this code