javascript - Sub navigation disappears when I click on it in responsive view -
i've created sub navigation , when click on (using jquery code), scrolls down , can hover on links dont appear @ all.
i tried looking causing problem such color
or background
can't find out went wrong. messing around visibility
, display
of element don't think theres problem there, although i'm unsure.
to isolate problem of code may lie, here sub navigation code:
ul { padding: 0; position: absolute; top: 33px; right: 16px; width: 150px; display: none; opacity: 0; visibility: hidden; @include transition('all .2s ease-in-out'); li { display: block; width: 100%; { width: 100%; display: block; background: lighten(#27344c, 10); color: #fff; padding: 0; padding-right: 14px; @include transition('all .2s ease-in-out'); } } li:hover { { background: lighten(#27344c, 5); } } }
i think problem may javascript on line when edit css styles:
$('#profiletoggle').on('click', function() { $('#profilelist').slidetoggle().css({'visibility': 'visible', 'display': 'block'}); $(this).addclass('active'); });
here jsfiddle: http://jsfiddle.net/8xat4v97/1/ (starts line 112 of scss code)
as @billynate had said,
the opacity set 0 reason in sub navigations.
removing line fixed issue! :)
Comments
Post a Comment