Problem with trigger() in a loop

Problem with trigger() in a loop

Hi all,

I don't know if this question has been asked before.
I have a loop and inside that loop I have a trigger and an event handler for the triggered event.
<Code Snippet>
$.each(loopvalue, function(k,v){
      var element = $("#divid").find(k);
            //do something
</Code Snippet>
If loopvalue has one element, everything works fine perfectly. If loopvalue has more that one element then the first cycle goes blank i.e no trigger() happens, however it works fine second element onwards.

I have tried : element.dblclick();
element.on('dblclick', function(event){});

All behaves the same way.

I believe I am missing something here, Any pointers/Docs will be of great help.

Thanks and Regards