简体   繁体   中英

JQuery Issue - Logo doesn't show up until scrolling

I implemented a jquery that changes the header when we scroll - http://www.usher1f.org/ . It's working very well except that the big logo on the left side does not show up when we first visit the page until we start scrolling. I want the logo to show up right away when first visit the page. How can we fix this issue?

its because your logo div needs to start out with class "large".

<div id="logo" class="large"></div>

instead yours starts with no class specified, and your scroll javascript appends one, but initially there is no class until someone scrolls so your logo has no height or width.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM