Just started using jQuery in some of our sites, but would really like to know how to NOT use it if the site visitor’s browser won’t support it. I’ve searched these forums for a while now, and re-read several of the relevant e-books I got from Sitepoint, but can’t seem to find anything usable about this issue.
Specifically, I’d like to add some code to the site template that would first determine if the visitor’s browser supports jQuery. If it does, continue on. If it doesn’t, display this instead.
I’d like to add some code to the site template that would first determine if the visitor’s browser supports jQuery. If it does, continue on. If it doesn’t, display this instead.
I understand that JS will be ignored if the browser doesn’t support it or the user has disabled it, but I’m not sure how to set up a page so that it displays the JS content if the browser can handle it, and displays HTML-only content if it can’t. It seems to me there should be some type of IF statement to control that. In other words, how do I set it up so that a JS-capable browser doesn’t display both (JS and HTML-only) content?