I following the example , i add the jQuery, but my side- nav does not work.
I tried everything .
When resizing for mobile it simply does not open.
Please Help-me.
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<scrpit text="text/javascript" src="js/script.js" ></scrpit>
My script.js
$(document).ready(function(){
$(".button-collapse").sideNav();
});
Thanks.
data-activates attribute must point to the nav ID. So either you rename data-activates to nav-mobile or make the ul ID mobile-demo
@eboye the data-activates is pointing to the sidenav ID. Looks like he's trying to build a top navigation menu.
@jeanhenriqq I wrote the code from your sample into this codepen: http://codepen.io/Nohinn/pen/dpXWjQ
I have tried from my mobile phone and I cannot reproduce the issue you're having. Are we missing any additional info?
@Nohinn By your code in codepen works , but when I switch on my local environment, wrong. It does not really work place ? I did not leave anything out.
Do you have any errors in console? If so, which ones?
Also, are you including scripts in the right order?
jquery
materialize
your_js
and if you are running on local machine, are you opening it via http://localhost or by opening html file in a browser? opening html in a browser makes some issues if the paths or urls are not done right. Actually it could be anything. Can you paste here or on codepen your code and test it out?
@jeanhenriqq Download the below zip file and try in your local envt. it will work fine.
sidenav-issue.zip
This zip file is exported from @Nohinn 's codepen.
if still you face any issue then reply to this thread we will be happy to help you!
@eboye i including scripts in right order, but for some reason it is not working.
@vishnu1991 exporting codepen code worked, I'm opening the live preview of the brackets . I not tried the localhost yet. I will follow from the example of codepen for some reason it worked ; - ;
@Nohinn @eboye @vishnu1991
Thank you really for helping me . If I can do something for you , is so call haha.
As we say here in Brazil, tamo junto. haha