Hi,

Sorry, that list should have been:

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/3

I'm sure everyone figured that out.

And this may be of interest: http://jsbin.com/ewire5/4

My guess is that the old engine used `getAttribute('src')` and/or
`readAttribute('src')`, but the new engine uses `src` directly. The
old behavior is probably more correct; the new behavior may be more
useful though... ;-)

-- T.J.

On Mar 10, 3:00 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> 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