<asp:Button ID="btnName" runat="server" Text="Change CSS" OnClientClick="return Test();" />
In the function Test, we can directly write "$("#btnName").css("color","red");", Instead of putting this in document.ready function. It will work in case of a small page but when the page is heavy and it's not completely loaded and you click on button, then it's quite possible that you can get an error of undefined object.
It's a best practice to always put your jQuery code in $(document).ready() function as this gives the assurance that DOM is fully loaded.
Feel free to contact me for any help related to jQuery, I will gladly help you.