I'm sorry I won't be able to post my code till tonight...

But I can sudo code it here: Note: I use coldfusion...

(Starting loop)

<cfset letEmRide = randomize(0000, 9999)>  << Picking a random number

<script>
$(documnet).ready(Function) {
$(".collapseThisPuppy<cfoutput>#letEmRide#</cfoutput>").hide();

$("clicker<cfoutput>#letEmRide#</cfoutput>").click(function()
{
$('.collapesThisPuppy<cfoutput>#letEmRide#</cfoutput>').toggle(400);
 return false;
  });
});
</script>

<a href="" class="clicker<cfoutput>#letEmRide#</cfoutput>">Hide/Show
Toggle</a>

<div class="collapesThisPuppy<cfoutput>#letEmRide#</cfoutput>">
Content
</div>

(iterating or ending loop)

Frank


On Nov 19, 9:26 am, "Priest, James (NIH/NIEHS) [C]"
<[EMAIL PROTECTED]> wrote:
> I'm working on something similar - can you post your HTML and jQuery
> code??
>
> Here's my 
> thread:http://groups.google.com/group/jquery-en/browse_thread/thread/4c30c5ae19
> ce901c/d6be93a0dd4fc205?lnk=gst&q=hiding+checkbox#d6be93a0dd4fc205001
>
> Jim
>
> > -----Original Message-----
> > From: FrankTudor [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 19, 2007 10:16 AM
> > To: jQuery (English)
> > Subject: [jQuery] hide/show (trying to prevent inline loop code)
>
> > Hi all, I an trying to create a simple hide/show toggle with jQuery,
> > but My content loops over a query and so when I test it it opens all
> > my table blocks (since they have Identical code duplicated to the
> > length of the records).
>
> > So then I got cleaver and created a variable that generates a random
> > number every time the code iterates the loop.
>
> > But then I have all these copies of something that needs to be only
> > created once.
>
> > So would other people manage this?
>
> > Thanks,
> > Frank

Reply via email to