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]
Why do you use a for? Try changing your code like this
var selectProduct = $('.mh60 a'); selectProduct.Hammer().on("press", function() { $(this).addClass('active'); });