Hi,
I'm having a problem wit using next(). I have this code which i've built in to a simple test page which you could run to see my problem (obviously you need jquery included in the same directory). IN firefox next finds the div and I get the alert back...as expected. the div is a sibling of the list item and so should allow me to get to the alert. However in IEx this does not happen. Any ideas why? I thought jquery was supposed to deal with browser inconsitency?! anyways heres my code. Thanks in advance for any replies Smile Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function accordion() { var y = $('ul#accordion li'); y.css({'color' : 'red'}) y.click( function() { var current = $(this).next(); if ((current.is('div')) && (current.is(':visible'))) { alert('hi'); } } ); } </script> </head> <body> <ul id="accordion"> <li>Analysis</li> <div class="accordionContent"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div> <li>Analysis</li> <div class="accordionContent"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div> <li>Analysis</li> <div class="accordionContent"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div> <li>Analysis</li> <div class="accordionContent"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div> </ul> <script type="text/javascript"> accordion(); </script> </body> </html> -- View this message in context: http://www.nabble.com/next%28%29-working-in-ff-but-not-in-iex-tp21745633s27240p21745633.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.