Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I'm encountering an issue I don't know how to deal with. On loading a page on a site I'm working on, the titles of the menu's that I want to use menu toggle on will appear for a split second and then disappear when (I think) the rest of the page's CSS loads. I've tried a lot of CSS things to keep them from showing up, from changing the text color, size, visibility, and I can't get anything to work. Has anyone else encountered this issue or know how to deal with it?
Comments
Comment #1
mgwisni CreditAttribution: mgwisni commentedAnd just like that I figured out why I couldn't do anything about it. I was targeting the h2 class of .at-menu-toggle when that class wasn't being put on until the javascript loaded. This worked just fine:
Comment #2
Jeff Burnz CreditAttribution: Jeff Burnz commentedThat's right, the JS is not going to really fire until the whole document is loaded, but the browser is going to start loading from top to bottom strait away.