I am trying to add press to jQuery selector. I have many elements on same document, So I can not use IDs for each. I tried by $(selector)[i] as like ex
press
$(selector)[i]
Finally I solved the problem by using each function
each
$('.mh60 a').each(function(){ var mc = new Hammer(this); var currentEle = $(this); mc.on("press", function() { currentEle.addClass('active'); }); });