Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • Variables aren't expanded inside strings in Javascript, you should use concatenation. Commented Feb 11, 2016 at 2:45
  • And :contains isn't for searching strings, it's for searching DOM elements. Commented Feb 11, 2016 at 2:46
  • Why the downvotes? This is a perfectly reasonable, well-constructed question? Commented Feb 11, 2016 at 2:48
  • Some people downvote any question that indicates the poster is clueless and hasn't done any debugging on their own. Like use the JS console to see what $('$current_swatch:contains("TB")') returns. Commented Feb 11, 2016 at 2:50
  • @Barmar - Well, it's nice to bump into you again here on SO, and thank you for all your hard work! Good comments, good editing. Thanks for the insight! Commented Feb 11, 2016 at 2:52