I'm trying to trigger a click on multiple elements with the same class but when i do so the first element only get clicked and not the others, frankly I'm trying to make likes to all ask.fm profile answers by using the console of firefox so this is what i did
$('.like').trigger('click');
but i realized that only the first element (answer) get clicked so i did something else
$('.like').each(function(){$(this).trigger('click');})
but the problem still exist, os what am i doing wrong here !!
Edit: The html code
all answers got this element in it
<a class="like hintable" hint="Like" href="#" onclick="Like.quickLike(128332156539, "mo7am_rs", "/likes/am77r/question/128332156539/add"); return false;" style="display:block"></a>
and i want to click this element in all answers element
triggerexecutes all handlers and behaviors attached to the matched elements, or in other words all elements with that class, so the issue isn'ttrigger, it's you, obviously!.likeclick handler code$('.like')elements ..