Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Modern usage
- From: paul at juniperwebcraft.com (Paul Novitski)
- Subject: [Javascript] Modern usage
- Date: Wed Apr 19 10:45:44 2006
At 07:47 AM 4/19/2006, Bill Moseley wrote: >I'm updating a site and I'm questioning some of the javascript. I'm >quite new to javascript, but I'm wondering how much of this might be >for very old browsers, and how much is still required today. For details on JavaScript support across browsers I recommend Peter-Paul Koch's http://www.quirksmode.org/ >The page also is using ypSlideoutMenu from 2001. Anyone familiar >with this? Would you consider it acceptable javascript? > >http://cvs.sourceforge.net/viewcvs.py/ypslideoutmenus/ypSlideOutMenus/ypSlideOutMenus.js?rev=1.2&view=auto > >http://ypslideoutmenus.sourceforge.net/demo/index.html I don't think it makes the grade: - It requires a mouse and doesn't work from the keyboard. - It uses inline scripting instead of unobtrusively applying behaviors from an external script. - It mis-uses markup attributes such as title. - The menus are unstructured clusters of anchors inside divs instead of unordered lists. - There's no structural relationship in the markup between parent menu items and their sub-menus. - When JavaScript isn't running, the individual menu links still work but the page styling is very broken. - The only thing this script provides that isn't possible using CSS alone is the sliding effect, which for me is too minor a benefit to justify its downsides. - On the positive side, the script does test for browser capabilities and doesn't merely sniff HTTP-REFERER. Mind you, three or four years ago I loved writing scripts like this. Having had my consciousness raised in the areas of markup semantics and accessibility I can look back fondly but I can't go back. Regards, Paul
- Follow-Ups:
- [Javascript] Modern usage
- From: Bill Moseley
- [Javascript] Modern usage
- References:
- [Javascript] Modern usage
- From: Bill Moseley
- [Javascript] Modern usage
- Prev by Date: [Javascript] Modern usage
- Next by Date: [Javascript] Modern usage
- Previous by thread: [Javascript] Modern usage
- Next by thread: [Javascript] Modern usage
- Index(es):