is there a way to disable global events inside a JQuery $.getJSON
function ?
The documentation only mention that the global property is available for an $.ajax
call, but nothing about $.getJSON
.
There reason I want to deactivate is that I have a global ajaxStart
event that I want to not handle the async JSON file reading.
Any possible solution ? Do I have to convert the $.getJSON
function to an $.ajax
call ?
This is what I am trying to solve but for an async $.getJSON
file event.
Advertisement
Answer
There is no available way to disable global events in a $.getJSON
.
I had to convert it to regular AJAX call from docs.
Changed this
JavaScript
x
2
1
$.getJSON(strUrl, function(response_data) {
2
to this
JavaScript
1
6
1
$.ajax({
2
dataType: "json",
3
url: strUrl,
4
global: false,
5
success: function(response_data) {
6