How to select element with ID generated dynamically?

How to select element with ID generated dynamically?

My code has a repeater / cloning field that adds number to the end of ID : -

  1. <input type="text" name="event[]" id="event">
That is, when cloned, I'll get the following in the DOM ;

  1. <input type="text" name="event[]" id="event1">
  2. <input type="text" name="event[]" id="event2"> 
My jQuery selector works only on the original element with ID="event"
  1. $("#event").stepper({ ....
I'm looking for the right way to make jQuery select event1, event2 and so on; as soon as they are created in the DOM. Would really appreciate if someone can help. Thanks!