using variables as attribute value in selector

using variables as attribute value in selector

Hello,

I am trying to use variables when specifying an attribute value in a selector statement.

so for example

var myVariable = 985; 

when  I use:   $("tr[iid*='985']").text()  she works fine.

but when i try to use a variable representing the string 985 she don't.

 $("tr[iid*=myVariable]").text()

Can anybody please help if there is a way to use variables to specify strings in this type of selector?  I just don't get it.

thanks  -dave