13
What I want to know is whether it is right to use Javascript/Jquery to do some button and screen effects, center the content horizontally and do certain tasks that can be done by CSS.
The company’s design here said it’s best to use JS/Jquery for performance and maintenance convenience, but I was researching on the subject and it seems that if I use JS it may have several compatibility errors and that it is more difficult to fix spot errors in certain resolutions, devices and software versions.
To develop web/mobile in a way that supports several screen sizes and different browsers is it correct to use Javascript to make animations and layout corrections or is it correct to use CSS/HTML only? Why?
Incorrect is not, you can be sure, as there are libraries like this to give compatibility to older browsers, the problem is that maintenance is much more complicated and probably more time consuming. Use only when necessary. I’m not going to formulate an answer because it’s a little broad and the answer may sound like "opinion", but it’s like this, use "javascript to control the layout position when necessary", if it can be done with css+html, then avoid js.
– Guilherme Nascimento
http://davidwalsh.name/css-js-animation
– Oeslei
Your question is with two closing votes as "mostly based on opinions". You can improve it to avoid being closed?
– Victor Stafusa
I think so, I’ll do that.
– Andrey Hartung
@Victorstafusa Got better? I don’t have much creativity to lecture -_-
– Andrey Hartung
One of the problems of using js for animations is the large volume of gambiarras that is inserted to do something (due to the inexperience of the programmers) that would have been easily developed with css. As @Victorstafusa put it, it takes common sense to know in which situation to use each technology.
– Oeslei