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.


Alternatively, add class="sales_info" to your HTML mark-up.

Then, do this:

$(".sales_info").bind("click", function() {
   ...
}