Better Social Buttons

Combine and use best practices in implementing social network buttons (Facebook, Twitter, Google+, Linkedin) like async loading, on-demand loading, etc.

Sources

Main ideas

  • Work without JS
  • Load third-party script "on-demand" (by clicking on the button)
  • Javascript API. Ex: bsb.load('twitter") ?
  • No extra library required (jQuery or other)
  • Heavy use of HTML5 data attribute (See phpied.com article)

Installation

Markup