BUILD 2349 dropdown menu tutorial -...

User 2823310 Photo


Registered User
312 posts

Ah okay, I thought it was for your buttons.
For that you still add the HEAD class but use this script
<script>
$(function() {
$(window).on("scroll", function() {
if($(window).scrollTop() > 50) {
$("#menu-ul").addClass("black");
} else {
$("#menu-ul").removeClass("black");
}
});
});
</script>

What that does is instead of going through all the classes it only looks for the menu ID
which makes it much more efficient. Plus you already have that ID if you used my tutorial, (It's on the container).
User 2823310 Photo


Registered User
312 posts

Oh and ie might want a 6 digit color?
<style>
.black { background-color: #000000;}
</style>
User 2699991 Photo


Registered User
5,397 posts
Online Now

Alter Eagle wrote:
Oh and ie might want a 6 digit color?
<style>
.black { background-color: #000000;}
</style>


The problem with IE & edge isn't the colour it's that it doesn't stick
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS


A simple quick way to contact me
https://mawarputih.coffeecup.com/forms/contact-wayan/
User 2823310 Photo


Registered User
312 posts

Yes, sticky is a css position. It's not supported in Edge until 16
http://caniuse.com/css-sticky/embed/
So basically that's why I go back to fixed position for the mobile accordion, but on the menu in horizontal I used it. That shouldn't be a problem though anyone that still uses those old ie browsers just won't see it stick to the top.

The foundation sticky creates problems in mobile, and fixed position in horizontal for the foundation grid requires it positioned only at the top and it has to be made full width. There is a jquery polyfill that can do it but since scrolling is used so much I personally think that resource use isn't worth the effect. So I kind of agree with coffeecup on this one, I'm assuming they'll let the users know when they write it up in the docs.
User 458539 Photo


Registered User
1,647 posts

AE,

Yes, its involved and I actually haven't tried it yet but looked through it and will. What I was glad to see was the off canvas menu. I have somebody in the future that wants that. I came through graphic design and am not that technical (evident from some of my questions over the years) and always learn something when one of you smart guys posts a tutorial.

Thanks

Byron

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.