Hi there! I need some assistance understanding why my latest script in this particular file isn't functioning properly. The main goal is for it to extract a value from JSON and compare it with a predefined value. Thank you all so much for your support!
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
var url = "https://graph.facebook.com/tenniswarehouse?callback=?";
$.getJSON(url,function(json){
var html = "<div id=\"tester\">" + json.likes + "</div>";
//A little animation once fetched
$('.facebookfeed').html(html);
});
});
</script>
</head>
<body onload="timeMsg()">
<div class="facebookfeed">
<h2></h2>
</div>
<script type="text/javascript">
var x =document.getElementById("tester").innerHTML;
if (x < 56700) {
document.write("it's working")
}
else {
document.write("it's not working")
}
</script>
</body>
</html>