Is using Javascript/JQuery for layout and style bad practice?
Posted
by
Renesis
on Programmers
See other posts from Programmers
or by Renesis
Published on 2011-11-22T20:26:50Z
Indexed on
2011/11/23
2:08 UTC
Read the original article
Hit count: 255
Many, but not all, HTML layout problems can be solved with CSS alone.
For those that can't, JQuery (on document load) has become very popular.*
As a result of its ease, many developers are quick to use JQuery or Javascript for layout and style — even without understanding whether or not the problem can be solved with CSS alone.
This is illustrated by responses to questions like this one.
Is this bad practice? What are the arguments for/against? Should someone who sees this in practice attempt to persuade those developers otherwise?
If so, what are the best responses to arguments in favor of JQuery saying it's "so easy"?
* Example: Layouts that wish to use vertical layout flow of some kind often run into dead ends with CSS alone — this would include layouts similar to Pinterest, though I'm not sure that's actually impossible with CSS.
© Programmers or respective owner