I can’t get this to work properly. This displays exactly how it displays on the website http://nicolahibbert.com/demo/liteAccordion/ under “Basic Implementation” which is just a regular ordered list. I implemented this on a site earlier today and it worked great but now that I’m home and trying to do it to another one it’s not working.
Here is some code….
<head>
<meta charset="utf-8" />
<title>506 Media</title>
<link rel="stylesheet" type="text/css" href="/Content/CSS/Site.css" />
<link rel="stylehseet" type="text/css" href="/Content/CSS/liteaccordion.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="/Scripts/modernizr-1.7.min.js"></script>
<script type="text/javascript" src="/Scripts/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="/Scripts/liteaccordion.jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('#content-container').liteAccordion();
});
</script>
</head>
Here is some more html…
<div id="content-container">
<ol>
<li>
<h2><span>Slide One</span></h2>
<div>
Test 1
</div>
</li>
<li>
<h2><span>Slide Two</span></h2>
<div>
Test 2
</div>
</li>
</ol>
</div>
I’ve tried adding the scripts in the body and without $(function() as it is shown on the site and nothing. Just a plain ordered list. No javascript errors either. What am I doing wrong?
Edit: Also, when I check the source after the page is run, nothing is applied to the html where it should have some classes and style attributes so the .liteAccordion() is doing nothing to my div… But again, no errors?
Well, after rechecking the resources, there were no red x on any of them but did realize that the classes and what not were being applied to the html that made the accordion. I realized that it was working, but the CSS wasn’t being applied and rechecking my Resources, the stylesheet required wasn’t in the list although it was in the HTML header. Problem was, as you can see in the code posted above…
It’s the little, most obvious things that drive us nuts..