[jQuery] Re: Return attribute content from XPath match //[EMAIL PROTECTED]'banner']/@alt

2007-07-10 Thread Karl Swedberg
On Jul 10, 2007, at 1:06 PM, Klaus Hartl wrote: Ok, say you want an array that gathers all the alt attributes of the matched elements, you can use the $.map method: var altAttrs = $.map( $('img'), function() { return this.alt; } ); --Klaus That's a good idea. Or, if you want to do stuff

[jQuery] Re: Return attribute content from XPath match //[EMAIL PROTECTED]'banner']/@alt

2007-07-10 Thread Klaus Hartl
[EMAIL PROTECTED] wrote: Well bad example, I will not be using it will the id attribute, and I will be getting more the one results, so $().attr() will not work. On Jul 10, 3:41 am, Klaus Hartl <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: with something like.. //[EMAIL PROTECTED]'bann

[jQuery] Re: Return attribute content from XPath match //[EMAIL PROTECTED]'banner']/@alt

2007-07-10 Thread [EMAIL PROTECTED]
Well bad example, I will not be using it will the id attribute, and I will be getting more the one results, so $().attr() will not work. On Jul 10, 3:41 am, Klaus Hartl <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > with something like.. > > > > > //[EMAIL PROTECTED]'banner']/@alt wou

[jQuery] Re: Return attribute content from XPath match //[EMAIL PROTECTED]'banner']/@alt

2007-07-10 Thread Klaus Hartl
[EMAIL PROTECTED] wrote: with something like.. //[EMAIL PROTECTED]'banner']/@alt would return "This is a banner". Doing it this way does not work, but is valid in XPather https://addons.mozilla.org/en-US/firefox/addon/1192 Is there another way to do this in JQuery (I am currently just looping