简体   繁体   中英

page going blank on clicking a link

When i open my site in Firefox and click in a link, static things like the sidebar and the menu are always there, they don't blink or something. Only the rest of the content changes.

On the other hand, in Chrome, when i click in a link, the whole page goes white for some milliseconds and then, the whole page appears.

Is there any way(javascript, css, etc) of forcing chrome to do the same firefox does?

For reference, this is called a page refresh. There are a few ways to prevent a page refresh, and the method you choose will depend on your scenario and size of your website.

One of the methods is using jQuery. You write your content in a different, hidden container (ie a <div style="display:none" /> in the same page and use jQuery to switch the contents.

Demo http://unwrongest.com/projects/tabify/

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