Created
September 5, 2013 15:17
-
-
Save karok/6451577 to your computer and use it in GitHub Desktop.
Facebook + Tripadvisor Widget - loading FB later. Problem with Tirpadvisor - not appearing
http://www.juicy-blue.com/testingFB.html
This file contains 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
<html> | |
<head> | |
</head> | |
<body> | |
<h1>TripAdv Reviews</h1> | |
<div id="TA_cdswritereviewlg881" class="TA_cdswritereviewlg"> | |
<ul id="wBZd5AdA" class="TA_links qq8lzxFil3wz"> | |
<li id="d5DMwddV" class="MNvEMl6cx2Pp">Review <a href="http://www.tripadvisor.co.uk/Hotel_Review-g189121-d1154914-Reviews-GoodFeeling_Hostel-Sagres_Faro_District_Algarve.html">GoodFeeling Hostel</a></li> | |
</ul> | |
</div> | |
<script src="http://www.jscache.com/wejs?wtype=cdswritereviewlg&uniq=881&locationId=1154914&lang=en_UK&border=false"></script> | |
<h1>Facebook LIke Button</h1> | |
<div id="addFBlikeButton"></div> | |
<h1>Facebook LIke Box</h1> | |
<div id="facebook-tripadvisor-boxen"></div> | |
<!-- Facebook später laden --> | |
<!-- Facebook später laden --> | |
<script> | |
window.onload = function(){ | |
var wait = 1000; // 3s | |
var btn = document.getElementById('addFBlikeButton'); | |
var btn2 = document.getElementById('facebook-tripadvisor-boxen'); | |
setTimeout(function(){ | |
// FACEBOOK LIKE BUTTON | |
var add = document.createElement('div'); | |
add.innerHTML = '<div class="fb-like" data-href="https://www.facebook.com/hostel.goodfeeling" data-send="true" data-layout="box_count" data-width="55" data-show-faces="false" data-font="arial"></div><div id="fb-root"></div>'; | |
btn.appendChild(add); | |
// FACEBOOK BOX | |
var add2 = document.createElement('div'); | |
add2.innerHTML = '<div class="fbbox"><span class="findusFB">Find us on Facebook</span><div class="fb-like-box" data-href="https://www.facebook.com/hostel.goodfeeling" data-width="292" data-show-faces="true" data-stream="true" data-show-border="false" data-header="false"></div></div>'; | |
btn2.appendChild(add2); | |
(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/de_DE/all.js#xfbml=1&appId=122879067810437"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk')); | |
}, wait); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment