Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
- <script type="text/javascript">
- // JSONP or "JSON with padding" is a communication technique used in JavaScript programs
- // running in web browsers to request data from a server in a different domain, something
- // prohibited by typical web browsers because of the same-origin policy.
- var url = "http://xproshowcasex.api.channel.livestream.com/2.0/livestatus.json"
- $(document).ready(function() {
- var par1 = $("#par1");
- $.ajax({
- 'url' : url,
- 'dataType' : "jsonp",
- 'success' : function(data) {
- if (data.isLive === true) {
- par1.html("live");
- } else {
- par1.html("offline");
- }
- }
- });
- });
- </script>
- </head>
- <body>
- <p id="par1"></p>
- </body>
- </html>
Add Comment
Please, Sign In to add comment