Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

burnssh

Member
  • Content Count

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. i have an embedded script on my site's homepage that uses JQuery's ready method to execute a function whenever I load my website. The code executes when I load the homepage the first time. But if I navigate to another page on my site and then come back to the homepage, the function won't execute again. How can I fix this? Here's the code: <div id="api_text"> <script> $().ready(function() { $.get( "https://example_url_api.com/", function(data) { const results = JSON.parse(data.body); let print_string = ""; for (var result_key in results) { const result_string = results[result_key]; $("#api_text").append(result_key + " : "); $("#api_text").append(result_value + "<br/>"); print_string += result_string; } console.log(print_string); } ); }); </script> </div>
×
×
  • Create New...