[SOLVED] attribute selector as variable not working

[SOLVED] attribute selector as variable not working

Hello again!

Here's what I hope to be a quick question that I should be able to figure out myself... but, unfortunately, I can't...

I'm trying to pass a variable into the attribute selector. When I substitute the "+myHref+" for "http", I get a match. When I log the myHref var, I get a match. What's wrong with my syntax? Why isn't the myLink finding a match?

var myHref = jQuery(".recipeThumb a").attr("href");

var myLink = jQuery(".recipeTitle a[href*='+myHref+']");

alert(myLink)


Thanks for the help!

-Jacob