Thanks for your response. I have the full version of the jquery library (see below snippet) and it's loaded before the function call.
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<title>Title</title>
</head>
<body>
<script>
$SCRIPT_ROOT = {{ request.script_root|tojson|safe }};
(function(){
$.getJSON(
$SCRIPT_ROOT+"/_specialroute",
function(dataABR) {
$("#var1").text(dataABR.var1)
$("#var2").text(dataABR.var2)
console.log(dataABR)
}
);
setTimeout(arguments.callee, 10000);
})();
</script>
<!-- The rest of the html document starts here -->
My ultimate goal is to update certain bits of the page (var1 and var2) every 10 seconds with the updated data from my database. The page loads fine for the first time and the variables are correctly displayed thanks to the console.log(dataABR) call. However, after the first 10 seconds, I get the error message on the console saying that $.getJSON is not a function. I googled and stackoverflow-ed but was unable to find a solution to my problem.
This is a jquery error rather than a python error so maybe this forum is not the right place to ask this. But any help would be greatly appreciated.