changed it from getJSON to $.ajax