[jQuery] Re: How to avoid triggering two patterns that match - from a JavaScript/jQuery lightweight

2008-11-12 Thread alanfluff
:D Thanks SO much Hector! That worked perfectly -- I am *most* grateful to you. Cheers, -Alan On Nov 12, 4:14 pm, "Hector Virgen" <[EMAIL PROTECTED]> wrote: > I think maybe something like this might work: > $('.maps').click(function() > { >     $(this).next('.expander.map').show(); > > }); >

[jQuery] Re: How to avoid triggering two patterns that match - from a JavaScript/jQuery lightweight

2008-11-12 Thread alanfluff
Wow! Thanks Hector - I am most grateful to you. I will try this tomorrow and let you know :) Cheers, -Alan On Nov 12, 4:14 pm, "Hector Virgen" <[EMAIL PROTECTED]> wrote: > I think maybe something like this might work: > $('.maps').click(function() > { >     $(this).next('.expander.map').show(

[jQuery] Re: How to avoid triggering two patterns that match - from a JavaScript/jQuery lightweight

2008-11-12 Thread Hector Virgen
I think maybe something like this might work: $('.maps').click(function() { $(this).next('.expander.map').show(); }); That would expand the next map based on whatever was clicked. I hope this helps :) -Hector On Wed, Nov 12, 2008 at 12:04 PM, alanfluff <[EMAIL PROTECTED]>wrote: > > Yep. G

[jQuery] Re: How to avoid triggering two patterns that match - from a JavaScript/jQuery lightweight

2008-11-12 Thread alanfluff
Yep. Get that. Tks. However, I am trying to make my code re-useable, right now there are two sets of trigger-and-map markup. I will have 10 to 20. I was hoping to find a jQ construct that would say: "if a map-trigger is clicked, I will expand the map that immediately follows it in the DOM". Tha

[jQuery] Re: How to avoid triggering two patterns that match - from a JavaScript/jQuery lightweight

2008-11-12 Thread Hector Virgen
You're right, $('.linkify.map:first') will always return the first element that matches linkify.map. If you want to make it in respect to a container, try $('#container').find('.linkify.map') -Hector On Wed, Nov 12, 2008 at 11:49 AM, alanfluff <[EMAIL PROTECTED]>wrote: > > Almost what I want -

[jQuery] Re: How to avoid triggering two patterns that match - from a JavaScript/jQuery lightweight

2008-11-12 Thread alanfluff
Almost what I want - but the first map is always the one shown, I could have explained better, my bad, sorry. Pseudo code for what I have: . . click-to-trigger-map mapOne[div] . . click-to-trigger-map mapTwo[div] . . etc The :first seems to make mapOne display, regardless which click-to- trigger

[jQuery] Re: How to avoid triggering two patterns that match - from a JavaScript/jQuery lightweight

2008-11-12 Thread alanfluff
Thanks _lots_ for the quick reply Hector -- I'll go try that. Cheers! On Nov 12, 2:22 pm, "Hector Virgen" <[EMAIL PROTECTED]> wrote: > Try $('.linkify.map:first'). That should return the first matched element. > -Hector > > On Wed, Nov 12, 2008 at 11:04 AM, alanfluff > <[EMAIL PROTECTED]>wrote:

[jQuery] Re: How to avoid triggering two patterns that match - from a JavaScript/jQuery lightweight

2008-11-12 Thread Hector Virgen
Try $('.linkify.map:first'). That should return the first matched element. -Hector On Wed, Nov 12, 2008 at 11:04 AM, alanfluff <[EMAIL PROTECTED]>wrote: > > Hi, > > I am trying to limit the scope of a click trigger to the first/next > matched target. > > This works fine if I have one container o