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" <r...@whitestonemedia.com>
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: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 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>

Reply via email to