jQuery - Switch between CSS files

jquery-switch-between-css-files

The tutorials listed below are slightly more difficult than the other jQuery tutorials we posted so far. You will learn how to make a switcher which enables the visitors of your website to switch between different style sheets. You could, for example, make different style sheets for workdays and weekends, for day and night or for normal days and for holidays. In the first video tutorial the PHP side of the switcher is explained. This might be too difficult for most people with no or less programming experience, but we recommend trying it. If you don’t understand it fully after the first time, watch it again!

If you think you understand the PHP part and you’re ready for the second video tutorial, you will learn how to add the jQuery to your page and how you can get the AJAX parts working. The jQuery code allows you to add some sort of overlay to your page which will make the transition between different style sheets much more eye-pleasing. Instead of seeing a black page for a couple of seconds, the visitor will see a loading icon. This gives you that little edge you should strive for as a web developer.


 
Back to Top