[SOLVED] Why don´t a function work onclick on a infinite-scroll content?

I load this simplified example when my page load. And when I have mousedown on an image it is showing the alert as it should.

wookmark();

function wookmark(){
   $$(".wookmarkpopover").mousedown(function(){
	 app.dialog.alert("mousedown test")
   });
}

But when I load new items to my list with infinite-scroll then when I try to mousedown on the images, then it is not running the funktion even if I call the function after the infinite scroll is finished loading.

And this is my full code.

wookmark();//so I run this when the infinite -scroll has finished----
function wookmark(){
	
	console.log('wookmark funktionen körs')

tapHoldFlag = false;
var wookmarkpopover;
var pressTimer;
$$(".wookmarkpopover").mousedown(function(){
	 app.dialog.alert("mousedown 111")
  		
    pressTimer = setTimeout(function() { 	
  wookmarkpopover.open();	
   tapHoldFlag = true;
  },300);
  return false;
  
}).mouseup(function(){
 clearTimeout(pressTimer);
  return false;
});	
}

So why is it working the first time and not when the new items has been added?
Any input really appreciated, thanks.

You must set listern for each object

Try this

 //get all objects with class .wookmarkpopover
var  wook =  $$(".wookmarkpopover")

for (var i = 0; i < wook.length; i++) {
    wookmark(wook[i]);
}  

 function wookmark(target){
    	
    	console.log('wookmark funktionen körs')

    tapHoldFlag = false;
    var wookmarkpopover;
    var pressTimer;
       target.mousedown(function(){
    	 app.dialog.alert("mousedown 111")
      		
        pressTimer = setTimeout(function() { 	
      wookmarkpopover.open();	
       tapHoldFlag = true;
      },300);
      return false;
      
    }).mouseup(function(){
     clearTimeout(pressTimer);
      return false;
    });	
    }

Thanks Overman.
But Im getting that "TypeError: undefined is not an object (evaluating 'target.mousedown')"
So it is not finding the .wookmarkpopover objects?

How many objects(wookmarkpopover) initially you have?

Im loading 5 at start now when testing.

Thanks a lot Overman. I got it working.

I made example for you

Yes thank you but the problem was not the first time, that was working, it was after I used the infinite scroll function.
But I got it working, thanks again.