[jQuery] Re: Need help cuz I don't get 'this'

2009-06-16 Thread Logictrap
Thanks for the tip and also the cycle plugin - It works great! -- Forwarded message -- From: Mike Alsup Date: Jun 16, 4:17 pm Subject: Need help cuz I don't get 'this' To: jQuery (English) > $(this).find('img').attr('src'); jQuery selectors accept a 2nd argument for context,

[jQuery] Re: Need help cuz I don't get 'this'

2009-06-16 Thread Mike Alsup
> $(this).find('img').attr('src'); jQuery selectors accept a 2nd argument for context, which makes this a bit more readable, imo: var src = $('img',this).attr('src');

[jQuery] Re: Need help cuz I don't get 'this'

2009-06-16 Thread Logictrap
>From a different forum I got this which works: $(this).find('img').attr('src'); On Jun 16, 11:18 am, Logictrap wrote: > I'm using the jqery cycle plugin with an onAfter & OnBefore function. > > These functions process the current div as 'this' - what I sent was > the code in my div that is get

[jQuery] Re: Need help cuz I don't get 'this'

2009-06-16 Thread Logictrap
I'm using the jqery cycle plugin with an onAfter & OnBefore function. These functions process the current div as 'this' - what I sent was the code in my div that is getting passed as 'this'. I can see that using children is the way to get the attribute I want, but I don't quite understand how to

[jQuery] Re: Need help cuz I don't get 'this'

2009-06-16 Thread MorningZ
I don't think you understood what code to show what you need to show is what is wrapped around your initial post's code so that it will be easier to help you understand "this" On Jun 16, 8:18 am, Logictrap wrote: > Thank you that worked!!! > > I think I may understand how to use children if yo

[jQuery] Re: Need help cuz I don't get 'this'

2009-06-16 Thread Logictrap
Thank you that worked!!! I think I may understand how to use children if you could also show how to get the img src attribute when 'this' contains: http://www.test.org"; target="_blank">Test Logo

[jQuery] Re: Need help cuz I don't get 'this'

2009-06-15 Thread Logictrap
Thank you that worked!!! I think I may understand how to use children if you could also show how to get the img src attrbitute when 'this' contains: http://www.test.org"; target="_blank">Test Logo On Jun 14, 9:25 am, Erik Beeson wrote: > Like MorningZ said, m

[jQuery] Re: Need help cuz I don't get 'this'

2009-06-14 Thread Erik Beeson
Like MorningZ said, more info would be helpful, but this should work: $('#output').html('SRC: ' + $(this).children('img').attr('src')); --Erik On Sun, Jun 14, 2009 at 7:02 AM, Logictrap wrote: > > I need to get the src attribute of an img element that is a sub- > element of 'this' but I can't

[jQuery] Re: Need help cuz I don't get 'this'

2009-06-14 Thread MorningZ
Can you show more code around the ".html" statement? this will help others better help you understand what "this" is in that context On Jun 14, 10:02 am, Logictrap wrote: > I need to get the src attribute of an img element that is a sub- > element of 'this' but I can't figure out how to traver