Facebook tab

In this example below you will see how to do a Facebook tab with some HTML / CSS and Javascript

This awesome code was written by helloIsaacFeldman, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright helloIsaacFeldman ©
  • HTML
  • CSS
  • JavaScript
    <div id="fb-root"></div>
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.3";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

$( document ).ready(function() {
    $('#fbButtonLogo').toggle(function() {      
      $('.facebookPageWrap').stop(true, true).animate({left:"0px"});
    }, function() {
      $('.facebookPageWrap').stop(true, true).animate({left:"-270px"});

<div class="facebookPageWrap">
<a class="facebookPageButton" id="fbButtonLogo">facebook</a>
<div class="facebookPage"> 
<div class="fb-page" data-href="FACEBOOK-PAGE-LINK"  data-small-header="false" data-adapt-container-width="false" data-hide-cover="false" data-show-facepile="true" data-show-posts="true" data-width="280"><div class="fb-xfbml-parse-ignore"><blockquote cite="FACEBOOK-PAGE-LINK"><a href="FACEBOOK-PAGE-LINK">‎‎</a></blockquote></div></div>

/*Downloaded from https://www.codeseek.co/helloIsaacFeldman/facebook-tab-pjwyzM */
    .facebookPageWrap {box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); background-color: #3B5998; background: rgba(59, 89, 152, 0.7); width: 280px; padding:0; position: fixed; left: -270px; z-index: 999; top: 185px;}
a.facebookPageButton{width: auto; display: block; position: absolute; right: -70px; top: 40px; background-color: #385794; padding: 3px 10px; border-top-right-radius: 10px; border-top-left-radius: 10px; box-shadow: 1px 0px 2px rgba(0, 0, 0, 0.4); -ms-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg); color: #fff; font-family: Tahoma, arial, sans-serif; font-weight: bold; font-size: 20px;}
.facebookPage{min-height: 500px; background-color: #fff;}

* Maximum width of 600 pixels. */
@@media screen and (max-width: 600px)
.facebookPageWrap{position: static; clear: both; box-shadow: none; background-color: transparent; background: none; padding: 15px 0; width:auto;}
  a.facebookPageButton{display: none;}
  .facebookPage{overflow: initial; background-color: transparent; text-align: center;}
  .fb-page{width: 280px;}

/*Downloaded from https://www.codeseek.co/helloIsaacFeldman/facebook-tab-pjwyzM */