Here’s a quick tip. Instead of writing:
1 2 3 | $(document).ready( function () { // Code and functions here }); |
We can instead write:
1 2 3 | $().ready( function () { // Code and functions here }); |
or even:
1 2 3 | $( function () { // Code and functions here }); |
Albeit, it isn’t a huge code reduction but it is a nice shortcut.