Use jquery starts with attribute selector
Alternative solution – 1 (highly recommended)
A cleaner solution is to add a common class to each of the divs & use
But you can use the first one if html markup is not in your hands & cannot change it for some reason.
Alternative solution – 2 (not recommended if
n is a large number) (as per @Mihai Stancu’s suggestion)
$('#editDialog-0, #editDialog-1, #editDialog-2,...,#editDialog-n')
Note: If there are 2 or 3 selectors and if the list doesn’t change, this is probably a viable solution but it is not extensible because we have to update the selectors when there is a new ID in town.