After removing the space from the jQuery src link, are your div's performing as you want?
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Erik Sent: Wednesday, December 30, 2009 10:45 AM To: jQuery (English) Subject: [jQuery] Re: Toggle link Needs to Be UNDERNEATH!!! Rick, If you wanted to have independent DIV'S that toggle, how would you do it? Erik On Dec 30, 10:36 am, "Rick Faircloth" <[email protected]> wrote: > Perhaps it's a simple as an extra space in your jquery src link: > > > <script src="/src/js/jquery/core/jquery-1.3.2.min.js" type="text/ > > javascript"></script> > > Note the extra space above in type="text/ javascript" ... > > When I tried to run your code, I get a $(document).ready(function() { > undefined error > until I took out that extra space. > > After I took out the extra space, the code seemed to be working properly... > > Rick > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > > Behalf Of Erik > Sent: Wednesday, December 30, 2009 9:19 AM > To: jQuery (English) > Subject: [jQuery] Re: Toggle link Needs to Be UNDERNEATH!!! > > Hi Rick, > > Thanks for your help... > > I made it really simple. > > Take a look at this: > > <!DOCTYPE html> > <html dir="ltr" lang="en-CA"> > <script src="/src/js/jquery/core/jquery-1.3.2.min.js" type="text/ > javascript"></script> > <script type="text/javascript"> > $(document).ready(function() > { > $('.SomeOtherClass').hide(); > $('a.SomeClass').click(function() > { > $(this).prev('div.SomeOtherClass').slideToggle(400); > $(this).text($(this).text() == 'More Details' ? > 'Close' : 'More Details'); > return false; > }); > }); > > </script> > > <body> > > <div class="SomeOtherClass"> foo </div> > <div><a href="#" class="SomeClass">More Details</a></div> > > <div class="SomeOtherClass"> foo </div> > <a href="#" class="SomeClass">More Details</a> > > <div class="SomeOtherClass"> foo </div> > <a href="#" class="SomeClass">More Details</a> > > <div class="SomeOtherClass"> foo </div> > <a href="#" class="SomeClass">More Details</a> > > <div class="SomeOtherClass"> foo </div> > <a href="#" class="SomeClass">More Details</a> > > <div class="SomeOtherClass"> foo </div> > <a href="#" class="SomeClass">More Details</a> > > </body> > </html>

