Created
October 16, 2021 16:08
-
-
Save phamngsinh/ecad4fb9efea4fe12b5c0465587c49af to your computer and use it in GitHub Desktop.
Facebook chat embed website
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style type="text/css"> | |
| .smagic39-messages { position: fixed; bottom: 0; right: 0; z-index: 999999; } | |
| .smagic39-messages-outer { position: relative; } | |
| #hisella-minimize { background: #3b5998; font-size: 14px; color: #fff; padding: 3px 10px; position: absolute; top: -34px; left: -1px; border: 1px solid #E9EAED; cursor: pointer; } | |
| @media screen and (max-width:768px){ #hisella-facebook { opacity:0; } .smagic39-messages { bottom: -300px; right: -135px; } } | |
| </style> | |
| <div id='fb-root'></div> | |
| <script> | |
| (function($) { $(document).ready(function(){ $( '#hisella-minimize' ).click( function() { if( $( '#hisella-facebook' ).css( 'opacity' ) == 0 ) { $( '#hisella-facebook' ).css( 'opacity', 1 ); $( '.smagic39-messages' ).animate( { right: '0' } ).animate( { bottom: '0' } ); } else { $( '.smagic39-messages' ).animate( { bottom: '-300px' } ).animate( { right: '-135px' }, 400, function(){ $( '#hisella-facebook' ).css( 'opacity', 0 ) } ); } } ) }); })(jQuery); | |
| (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_US/sdk.js#xfbml=1&version=v2.0"; | |
| fjs.parentNode.insertBefore(js, fjs); | |
| }(document, 'script', 'facebook-jssdk')); | |
| </script> | |
| <div class="smagic39-messages"><div class="smagic39-messages-outer"><div id="hisella-minimize">Facebook chat</div><div id="hisella-facebook" class='fb-page' data-adapt-container-width='true' data-height='300' data-hide-cover='false' data-href='https://www.facebook.com/smagic39/' data-show-facepile='true' data-show-posts='false' data-small-header='false' data-tabs='messages' data-width='250'></div></div></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment