Skip to content

flenczewski/SmartLikeIt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SmartLikeIt

Smart Facebook "Like" button

Demo: http://fabian.art.pl/smartlike/example/

Sample usage

HTML is like normal Facebook Like Button: https://developers.facebook.com/docs/plugins/like-button

<div class="fb-like" data-href="https://www.facebook.com/fanpage" data-trigger="hover" data-layout="button" data-send="false" data-show-faces="false"></div>

and next load SmartLikeIt library:

<script>
    function atOnload(){var smartlike = document.createElement("script");smartlike.src = "../smartlike.min.js";smartlike.async=1;document.body.appendChild(smartlike);}
    window.addEventListener?window.addEventListener("load",atOnload,!1):window.attachEvent?window.attachEvent("onload",atOnload):window.onload=atOnload;
</script>

Additional "smart" params:

  • data-trigger="hover" - load facebook like button on hover
  • data-trigger="visible" - default load

Benchmark

alt tag

About

Smart Facebook Like It button

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published