Classic Jquery scroll with Flexslider
Hi,
I have a index.php with very menu items. When i click on my menu anchor link, the page scrolls to it's own anchor name attribute and, WITHOUT FLEXSLIDER everythings works fine. With flexslider fullscreen activated i can't scroll down slowly anymore.
It seems like anchor tags on my menu items are disabled by flexslider. Is there a way to fix it?
In the Flexslider folder I have found slider.css files and at this row:
- body, html {margin:0; padding:0;width:100%;height:100%!important; overflow-x: hidden;}
If I remove "height 100%" everytings works fine but i lose my responsive and fullscreen flexslider.
Can You help me?
This is a summary of my homepage:
- <html>
- <head>
- .......
- <!--MYSCROLL-->
- <script type="text/javascript">
- $(function() {
- $('a[href*="#"]:not([href="#"])').click(function() {
- if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
- var target = $(this.hash);
- target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
- if (target.length) {
- $('html, body').animate({
- scrollTop: target.offset().top
- }, 1000);
- return false;
- }
- }
- });
- });
- </script>
- <head>
- <body>
- <nav>
- <ul>
- <li><a href="/index2.php?s=1#link1">Servizi</a></li>
- <li><a href="/index2.php?s=1#link2">Mission</a></li>
- </ul>
- </nav>
- <div> .... FLEXSLIDER FULLSCREEN </div>
- <section>
- <a href="" name="link1"></a>
- <a href="" name="link2"></a>
- </section>
- ........ FLEXSLIDER JAVASCRIPT
- </body>
- </html>
Thank you very much!