jQuery match only part of id from div

You could use the “Starts With” selector:

$('div[id^="sales_info_"]')

I’d rather recommend you use a unique class name for your elements that you can select on though.

Leave a Comment