Created
December 5, 2024 21:05
-
-
Save sdubois/fbf71a2f67e327c3b5c197ca5a0998b7 to your computer and use it in GitHub Desktop.
Wix EruvStatus API Example 2024
This file contains hidden or 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
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | |
<p id="eruvstatus"></p> | |
<script> | |
var timestamp = new Date().getTime(); | |
$.getJSON(`https://eruvstat.us/eruv/98/json?_${timestamp}`, function(data) { | |
array = $.makeArray(data); | |
var text = `The eruv is <strong>${array[0]['field_status']}</strong>. ${array[0]['field_status_info']}<br><br>Last updated: ${array[0]['field_date']}`; | |
$("#eruvstatus").html(text); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment