Awesome Rick! Glad I could help and again welcome to the jQuery community. As you can see, jQuery is REALLY straightforward and its one of the reasons that I've been promoting it on cf-talk. I'm glad another CF-notable is using it. Make sure to spread the word bud.
Rey... Rick Faircloth wrote: > Hi, Rey...I seem to have gotten a good handle on the code. > What I'm after is clicking the title and making the text slide, so I had > to reverse the "title" and "text" in your code, and change the "prev" > to "next" to get it to work like I want. > > I was able to get it working with some CF, also... > > > Here's what's in custom.js: > > $(document).ready(function() { > > $('div.ann').find('p.text').hide().end().find('p.title').click(function() { > var answer = $(this).next(); > if (answer.is(':visible')) { > answer.slideUp(); > } else { > answer.slideDown(); > } > }); > }); > > > and here's the HTML...(now, for some reason, it decides to work without > putting the js in the head...go figure...): > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > <html> > <head> > <title>Untitled</title> > > <script src="jquery.js" type="text/javascript"></script> > <script src="custom.js" type="text/javascript"></script> > > > </head> > <body> > > <div class="ann"> > > <p class="title"> > This is my title. > </p> > <p class="text"> > This is my text. > </p> > > </div> > > </body> > </html> > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Rey Bango > Sent: Saturday, November 18, 2006 7:53 PM > To: jQuery Discussion. > Subject: Re: [jQuery] What's wrong with this code? (Started on Firebug > thread) > > Hi Rick, > > Funny thing is that I never included custom.js at all. Take a look at the > file attached. Its basically your code but just reworked a little bit with > the changes that I suggested earlier. > > Whats in custom.js? I'm curious to know why pushing it to the head resolved > the issue. > > Rey... > > > > > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/