[jQuery] Re: Accessing dynamically created divs

2007-10-14 Thread Kenneth
On 10/11/07, Yasmary Mora <[EMAIL PROTECTED]> wrote: > > > Hello! > > Got a question that I havn't been able to answer. This is my last resort. > :) > > So, I have a list of dynamically created divs, with a link next to > them to show or hide text inside of it. I know how to do it when its > only a

[jQuery] Re: Accessing dynamically created divs

2007-10-12 Thread Yaz
Oh Thank you all! And yes I can change the php output, I didn't know one method was better than another. :) -yaz On Oct 12, 6:51 am, Wizzud <[EMAIL PROTECTED]> wrote: > If you don't have control over the php then ... > > $('a[id^=showtxt]').click(function() { > var divID = this.id.repla

[jQuery] Re: Accessing dynamically created divs

2007-10-12 Thread [EMAIL PROTECTED]
Hi from Mex other opcion: (no speak english so) --- - show textText here show textText here show textText here show textText here ---

[jQuery] Re: Accessing dynamically created divs

2007-10-12 Thread Joan Piedra
Hello Yasmary, Can you modify the php output? If so, I would suggest you to use class instead of id. You could also try using the next() function. Hope I didn't misunderstood your message. Regards. show textText here show textText here show textText here show textText here $('.showtxt').click(fu

[jQuery] Re: Accessing dynamically created divs

2007-10-12 Thread Wizzud
If you don't have control over the php then ... $('a[id^=showtxt]').click(function() { var divID = this.id.replace(/^showtxt(\[)(\d+)(\])$/, '#textbox \\$1$2\\$3'); $(divID).slideToggle(400); return false; }); If you DO have control over the php then I would recommend c