Back to the Shapespark home page

Help needed to execute third party jQuery

Hello team,

Firstly, this forum is great and congratulation for building a great product.

Issue: I am trying to execute an Ajax function in the head-end.html file to place custom positions for extensions from our backend portal. We are trying to place custom hotspots to track user analytics. However, I am getting the following error while executing the file. TypeError: $.ajax is not a function. Please find the code snippet below for your refernce. Your help would be greatly appreciated. Thank you.

$.ajax({
type: “GET”,
url: “https://xpobackend.herokuapp.com/xpo/api/user/threed_coordinates_for_stall”,
dataType: “json”,
success: function (result, status, xhr) {
console.log(result)
},
error: function (xhr, status, error) {
alert("Result: " + status + " " + error + " " + xhr.status + " " + xhr.statusText)
}
});

Shapespark doesn’t include jquery library, try loading it first using the <script> tags.