Hi,

My suspicion is if you change your selector to use $= rather than =
(e.g., 'img[src$="images/icons16/btn_add.gif"]'), it'll start working
again. The $= operator looks for an attribute _ending_ in the given
string rather than _equalling_ it.[1]

I haven't looked into it, but my guess offhand is that the selector
engine in 1.7 is matching against the image's fully-resolved URL,
whereas 1.6's old engine was using the relative URL in the attribute.

FWIW, it's easily replicated:
Using 1.6.1 and "=", works: http://jsbin.com/ewire5/
Using 1.7 and "=", doesn't work: http://jsbin.com/ewire5/2
Using 1.7 and "$=", works: http://jsbin.com/ewire5/2

[1] http://www.w3.org/TR/css3-selectors/#attribute-substrings

HTH,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

On Mar 10, 2:35 pm, Incero <helgeonthe...@googlemail.com> wrote:
> Hi,
> I'm using the following statement in Prototype 1.6.1 to hide an image:
> $('MyContainerId').select('img[src="images/icons16/
> btn_add.gif"]').invoke('hide');
> but after updating to 1.7 the select statement returns [] instead if
> the image object.
> Is this a problem of 1.7 or have I used the select function in a wrong
> way?
>
> I've tested this code in IE8 and Firefox 3.6. The html looks like
> this:
> <img border="0" align="absmiddle" title="Remove" src="images/icons16/
> btn_add.gif">
>
> Thanks
> Incero

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to