DeanWhitehouse Posted June 29, 2008 Share Posted June 29, 2008 I have made this function to laod a different style sheet when they change a drop down box. <script type="text/javascript"> function preview() { var theme =document.reg.theme.value; document.getElementById("style").href = theme; } </script> <html> <body> <select id="theme" name="theme" onChange="preview()"> <option value="original.css">Original</option> <option value="classic.css">Classic</option> <option value="dark.css">Dark</option> <option value="light.css">Light</option> <option value="modern.css">Modern</option> </select> </body> </html> My problem is that there is a lsight delay before it loads the next style sheet. Is there any way to preload the style sheets? Link to comment https://forums.phpfreaks.com/topic/112486-solved-preload-stylesheets/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.