JQuery Transform -Skala

I've actually tested below and seems to be working?

$('.sc-bar').css('transform','scaleY(0.5)');
Is the line enclose on $(document).ready() or made sure that jQuery is loaded before using this like below?

// A $( document ).ready() block.
$(document).ready(function() {
    // your code here...
    $('.sc-bar').css('transform','scaleY(0.5)');
});
Santino