Closed mmcatee closed 10 years ago
@mmcatee, the selector simply allows SlickNav to replicate the existing menu. After that it uses its own selectors for the newly created SlickNav. I am a little confused as to what you are saying is actually happening. Do you have any live code to look at to easier diagnose?
Hello, Thanks for the response, I believe I was using an older version of JQuery, I was getting an error on line 161 of jquery.slicknav.js once I pointed to the latest version of JQuery that went away.
Thanks, Malcolm
I am integrating slick nav with Drupal. It is a bit difficult to get Drupal to attach an id to the top level
so I used a first-child selector instead.
like so:
(function ($, Drupal) { $(document).ready(function(){ $('#block-system-main-menu > ul.menu').slicknav({ 'duration': 400, 'easingOpen': 'swing', 'easingClose': 'swing', 'allowParentLinks': false }); }); })(jQuery, Drupal);
and the corresponding CSS:
@media screen and (max-width: 768px) {
block-system-main-menu > ul{
.slicknav_menu { display:block; position:absolute; top:160px; left:0px; width:100%; z-index:9999; } }
I suspect that my issue has something to do with JQuery selector since it seems that the inline display property is not being rewritten from "none" to "block" on the nested
when clicked (the other attributes are also not being changed)
ul class="menu slicknav_hidden" role="menu" aria-hidden="true" style="display: none;"
Thank you!