|
Posted by Ben C on 10/17/06 08:30
On 2006-10-17, John Salerno <johnjsal@NOSPAMgmail.com> wrote:
> I know a lot of you guys are hardcore about writing proper HTML/CSS, so
> I'm curious what you feel Javascript should be used for specifically.
> Everyone seems to say not to use it for anything necessary, since it can
> be turned off. I know sometimes you can use CSS for certain effects
> instead. So what are the real, valid uses of Javascript? Does anybody
> think you just shouldn't use it? Or are there other, more advanced uses
> of JS that I'm not thinking of?
Use HTML for the content, CSS for the presentation and JS for the
behaviour.
For example, :hover can be used for simple effects, but for complicated
popup menu systems, JS is the better tool for the job.
And as you say remember that people might turn it off. In principle
people can also turn off your CSS too by using user important
stylesheets, but maybe fewer people do in practice.
Examples of "advanced" JS would be web apps like Google Maps and
Microsoft's Outlook web interface.
Navigation:
[Reply to this message]
|