** Updated **
So after some more investigation I have narrowed it down to this piece of javascript preventing the affix class to work.. but again.. I'm not sure why this would break the page??
var panelExample = $('#someID').scotchPanel({
containerSelector: 'body', // Make this appear on the entire screen
direction: 'left', // Make it toggle in from the left
duration: 300, // Speed in ms how fast you want it to be
transition: 'ease', // CSS3 transition type: linear, ease, ease-in, ease-out, ease-in-out, cubic-bezier(P1x,P1y,P2x,P2y)
clickSelector: '.toggle-panel', // Enables toggling when clicking elements of this class
distanceX: '300px', // Size fo the toggle
enableEscapeKey: true // Clicking Esc will close the panel
});
I have been trying to figure out why the affix class breaks when I have a slide out menu. The site I am currently working on is this: site link
If you see the other pages, the menu will stick to the top after you scroll down. But the criminal page it doesn't work. I have narrowed it down to this part of the HTML that is causing it not work, but I just can't seem to figure out why. There doesn't look like there is anything special about that div tag.
<div id="burgerWrapper" class="toggle-panel"> <h3 id="closeBtn">X</h3> <ul> <li class="hidden"><a class="page-scroll" href="#page-top"></a></li> <a href="#criminalLaw" class="page-scroll"><li>CRIMINAL LAW</li></a> <a href="#criminalLocalCourt" class="page-scroll"><li>LOCAL COURT MATTERS</li></a> <a href="#criminalMentalHealth" class="page-scroll"><li>SECTION 32 APPLICATIONS</li></a> <a href="#criminalConviction" class="page-scroll"><li>CONVICTION AND SEVERITY APPEALS</li></a> <a href="#criminalBail" class="page-scroll"><li>BAIL APPLICATIONS</li></a> <a href="#criminalSerious" class="page-scroll"><li>SERIOUS CRIME</li></a> <a href="#criminalPenalties" class="page-scroll"><li>PENALTIES AND SENTENCES</li></a> <a href="#criminalFee" class="page-scroll"><li>FEE ARRANGEMENTS</li></a> </ul> </div>
When I remove this div, it works. Any help or a push in the right direction would be great!
Thanks