how do i build a dynamic selector

how do i build a dynamic selector

I'm having some problems creating a dynamic selector. 

I'm using the BeautyTips plugin and i can attach a tooltip to a div by using the id of the div, for example:

  1. $('example2').bt({ // attaching to one element by id
  2.     contentSelector: "$('#example2-content')" // this will return, as the tooltip's content, what's in example2-content
  3. });

This works well BUT: how do I make the content selector dynamic if i need to attach a pop-up to multiple images like this:

  1. $('#test img').bt({ // i'm selecting multiple images in the test div
  2.     contentSelector: "$('#example2-content')" // this will return the SAME content for all images
  3. });

So this is what i struggle with: changing that "example2" to be dynamic something like this:

  1. $('#users img').bt({
  2.     contentSelector: "$('#example"+ $(this).attr('id') +"')"
  3. });

for some reasong this type of concatenation doesn't work and i feel i'm missing something very basic in building that dynamic id.