Diodius' answer is probably the best choice, but since that is not what you asked for I gave the code below. That said, I think you should STRONGLY consider Diodius' answer.
Is this (solution for the 'similar question', link above) cross-browser compatible, i.e. does this work in all browsers?
Yes. I should work in most modern browsers.
Also, what should be added to the jQuery file in order to make the stylesheets auto-switch (the light style for daylight hours and the dark style for nighttime)?
I'm not sure what you mean "added to the jQuery file". You don't add anything to the jQuery file, you simply reference it, then jQuery is available in your javascript after that.
so to change your style based on the time of day you'd have something like this:
<link type="text/css" rel="stylesheet" id="timeofdaystyle" href="day.css"/> <script type="text/javascript" src="jquery-1.7.2.min.js"></script> <script type="text/javascript"> $(function() { var d = new Date(); var hour = d.getHours(); if (hour < 8 || hour > 20) { //between 8pm and 8am $('#timeofdaystyle').attr('href', 'night.css'); } else { /* this is unnecessary really, because you already have it set to day.css, but I'll add it as an example */ $('#timeofdaystyle').attr('href', 'day.css'); } }); </script>
*If .js is used for javascript files, is .jq used for jQuery? This is my first time seeing a jQuery solution, as I typically type 'javascript' in the ol' search engine.
No, .js files are used for all JavaScript. jQuery is JavaScript, therefor the .js extension is used.
I hope that helps.
.jqfiles exist, or are needed. To get an answer to the rest of your question, post your question independently of another. Again, you will see in the FAQ that straightforward questions here get straightforward answers.