ecometer

Favor instant visual changes

(Development)
#36

Animations, whether created with CSS or performed by JavaScript, generate lots of repaint/reflow. It is thus better to use instant rather than animated changes in order to use less CPU resources.

Avoid fade in/fade out JavaScript effects in sliders. Instead of:

<script>
$('a').click(function () {
    $('#foo').fadeIn();
});
</script>

write:

<script>
$('a').click(function () {
    $('#foo').show();
});
</script>
This best practice should only be applied if it is coherent with your project's specifications.
Under CC-By-NX-SA license