Hide certain things from users that have javascript disabled
by
14 Nov 2007
Rating: (2 votes
- 4.50 average)
Hide certain things from users that have javascript disabled I needed this for a project I'm working on, and thought I'd share it, as I liked my idea a lot. Instructions Open your headinclude template and add this code at the very bottom: HTML Code:
<!-- is js enabled? --> <noscript> <style type="text/css"> .ifjs { display:none; } </style> </noscript> <!-- / is js enabled? --> HTML Code:
<div class="ifjs">visitors with disabled js won't see this</div> <div class="alt1 ifjs">visitors with disabled js won't see this</div> Feel free to go crazy with javascript now and not worry about those morons who disable it! |