These are the two tasks that I’ve found so far…I expect find more as time goes by:
document.write automatically inserts copy and/or HTML code into a web page. So if the following
code was placed between the two body tags:
document.write("This is some text.");
The following text would appear wherever you placed this code on your web page:
This is some text.
This one is a bit confusing:
Now for the confusing part…
jQuery actually does offer an alternative to
navigator.userAgent in the form of the .browser property, but the jQuery team strongly recommends that you don’t use it!!!! In order for .browser to actually work, navigator.userAgent still needs to be working behind the scenes in the jQuery library. And since many recommend avoiding navigator.userAgent altogether, the team says “we don’t think that you should use .browser.” They further state that .browser will be implemented in future versions, most likely via a plug-in.
It’s important to note that even if you use the .browser property in your code, it can only detect Internet Explorer, Firefox, Opera and the various Webkit browsers. In other words, it can’t detect Androids or older Blackberries and it may or may not detect iPhones, newer Blackberries and the various tablets like the iPad and the new Blackberry Playbook.
As an alternative to .browser, jQuery offers the .support property which detects browser-specific properties. The jQuery documentation goes in great detail on how to use .support as well as why you shouldn’t use .browser. I suggest that you read up on both of them before you attempt you use the code.
Next up: my take on HTML5 video!