I need to make this data variable global:
data
$.ajax({ url: \"get_data.php\", cache: false, dataType: \'json\', data: {}, succes
Set a variable equal to what you wish data to be equal to. And when giving data its value, reference the variable. Like this:
var obj = {}; $.ajax({ // .... data: obj, // .... });