For this code to work, the user needs to first click the like button and then continue to proceed. However, I am having trouble getting the div event to function properly. The like button is located within a div called postos. When something is clicked within this div, it should enable access to thanks.php.
I have also attempted the following:
<script type="text/javascript" charset="utf-8>
$(document).ready(function () {
$("#postos").click(function () {
$("#linkos").attr('href', 'thanks.php');
});
});
</script>
<script src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
<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/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>;
<div class="fb-like">
<div id="postos">
<div class="fb-like" data-send="true" url="http://tehcplz.org" data-width="450" data-show-faces="true"></div>
</div>
<br><br>
<p>Continue <a id="linkos" href='javascript:window.alert("like us");'><br/>Click to continue</a><br></p>