The Drupal alternate better method to add jQuery

We usually add

$(document).ready(function () {
  // Do some fancy stuff.
});

However in drupal 8 we have better method.

How to style google plus button?

Insert the the google button inside a div and apply the background to it.


background: rgb(213,71,43);

How to style Facebook button?

Insert the the facebook button inside a div and apply the background to it.


background: rgb(107,129,205);

How to style Tweet button?

Insert the the twitter button inside a div and apply the background to it.


background: rgb(55,170,220);