Jquery or pure JS + CSS3?

1

The CSS3 has gained so many utilities that previously were only possible with programming, for example: Media queries, fb, keyframe, transition etc ...

So what are the advantages, disadvantages and when should I use?

    
asked by anonymous 29.11.2014 / 03:26

2 answers

2

Must use CSS whenever possible. The only drawback you can / should have is because of older browsers that may not support modern functionality.

CSS3 and its features are already part of the browser software, which means that intepretting CSS is faster to process, you do not need to read / parse JavaScript to do a fade in for example, this is very useful. It's faster rendering and you do not need to download so many Kb.

    
29.11.2014 / 09:54
1

I consider using all.

For example, in a single file .js I mix pure JavaScript and jQuery, in other%% of me I benefit from the control I can have over the style of each element in a more organized way.

Another example is the creation of animations. In CSS, animations like fadeOut are less practical than jQuery. As far as styling (colors, sizes, filters, etc.), in my opinion, CSS is the best choice.

When it comes to jQuery and pure JS, the former is reputed to be more practical because of its simple syntax, but for calling functions I always opt for the old JS because I feel more comfortable using function calls like .css in which part you want in HTML, be minhaFuncao() , onclick , etc.

    
29.11.2014 / 04:20