On 5/3/07, Scott Sauyet <[EMAIL PROTECTED]> wrote:
I'm not sure, but I think this would do it: $("img[src*=images/m]").eq(0).addClass("newimage");
Very close, Scott. It should be: $("[EMAIL PROTECTED]'images/m']").eq(0).addClass("newimage"); Attribute selectors always begin with @[1] and I added quotes around "images/m" just for safety, as jQuery sometimes has issues when you don't use them. [1] Technically, what you had is a correct CSS selector, but jQuery supports both XPath and CSS selectors and XPath uses [EMAIL PROTECTED] as an attribute selector and [...] as something else (I forget what exactly), so to avoid any ambiguities, the selector engine follows XPath's attribute selector syntax everywhere. See http://docs.jquery.com/DOM/Traversing/Selectors#Supported.2C_but_different. -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com