Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- ***** Ten fragment kodu dodajesz po tagu <body> *****-->
- <div id="fb-root"></div>
- <script>(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/pl_PL/sdk.js#xfbml=1&version=v2.7";
- fjs.parentNode.insertBefore(js, fjs);
- }(document, "script", "facebook-jssdk"));</script>
- <div id="backFB" style="display: none; width: 100%; height: 100%; background: RGBA(6, 4, 4, 0.80); position: fixed; top: 0px; left: 0px;"></div>
- <div id="fbbox" style="display:none; position: fixed; top: 25%; left: 30%">
- <!--
- W data-href wpisujesz url fanpage (https://www.facebook.com/nazwa_fanpage/) np. https://www.facebook.com/facebook/
- -->
- <div class="fb-page" data-href="https://www.facebook.com/facebook/" data-width="500" data-height="250" data-small-header="true" data-adapt-container-width="false" data-hide-cover="false" data-show-facepile="true">
- <!-- W cite wpisujesz url fanpage-->
- <blockquote cite="https://www.facebook.com/facebook/" class="fb-xfbml-parse-ignore"><!-- W href również wpisujesz url fanpage--><a href="https://www.facebook.com/facebook/"><!--Usuń komentarz i wpisz sobię nazwę swojej strony np. strona.pl, cokolwiek :)--></a></blockquote>
- </div>
- <div id="closeBtn" style=" cursor: pointer;top: -11px; left: 480px; width: 35px; height: 35px; background-color: rgb(74, 72, 72); color: white; text-align: center; position: absolute; font-size: 25px;">✖</div>
- </div>
- <!--***************************************************************** -->
- <!-- ***** Ten kod wklejasz tuż NAD tagiem </body> -->
- <!-- Jeżeli masz już na stronie wtyczke jQuery to usuń pierwszy <script> -->
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
- <script src="fbscript.js"></script>
- <!--***************************************************************** -->
- <!--*****************************************************************
- Utwórz plik o nazwie fbscript.js i wklej poniższy kod. Plik umieść w głównym katalogu strony.
- ******************************************************************************************* -->
- $(document).ready(function(){
- if(getCookie("fbbox") != 1){
- $("#backFB").show();
- $("#fbbox").show();
- setCookie("fbbox", 1, 365);
- }
- });
- $(function(){
- $("#backFB").click(function(){
- $("#backFB").hide();
- $("#fbbox").hide();
- });
- });
- $(function(){
- $("#closeBtn").click(function(){
- $("#backFB").hide();
- $("#fbbox").hide();
- });
- });
- function setCookie(cname, cvalue, exdays) {
- var d = new Date();
- d.setTime(d.getTime() + (exdays*24*60*60*1000));
- var expires = "expires="+d.toUTCString();
- document.cookie = cname + "=" + cvalue + "; " + expires;
- }
- function getCookie(cname) {
- var name = cname + "=";
- var ca = document.cookie.split(';');
- for(var i = 0; i < ca.length; i++) {
- var c = ca[i];
- while (c.charAt(0) == ' ') {
- c = c.substring(1);
- }
- if (c.indexOf(name) == 0) {
- return c.substring(name.length, c.length);
- }
- }
- return "";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement