Help with Collapsing list and Microformats not being detected
I'm reading jQuery Novice to Ninja by Sitepoint right now. Currently I'm in the chapter on menus and am working on a page that contains a collapsing list that contains hCard microformats for all listed businesses on that page. The sample page is located here:
http://fossilfoundry.com/collapselist.htm
When the jQuery code for my collapsing list is not included in the .htm file, both Tails Export, and Operator Extensions for Firefox find all of the microformats on the page. However, when the jQuery code that makes the collapsing list function is in the page, Operator doesn't find any microfromats while Tails Exports still sees them all.
So I am presuming it is something in the way I have collapsing list coded that could be causing the issue. I would like to know:
- Is there a better way to code the collapse list that is more inline with "best practices"
- Is this an issue with the jQuery I've written or with the extension.
The jQuery code I am using is:
- <script src="scripts/jquery-1.3.2/jquery-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
function panelCollapse() {
$('#panels ul').hide();
$('#panels li a').click(
function() {
$(this).next().slideToggle('normal');
$(this).toggleClass("expanded").toggleClass("collapsed");
return false;
});
}
$(document).ready(function() { panelCollapse(); });
</script>
Any help would be greatly appreciated.