I am using this code here for a webpage from which I am cheating:
$(function() { console.log('Here'); $.ajax({ type: 'POST', url: 'http://api.bf3stats.com/pc/playerlist/', data: { players: ['xxx', 'xxxx', 'x'] }, success: function(data) { loadData(data, 'x', 'f'); } }) }) function loadData(data, uname, $) { $('#fWins').text("135"); }
But as soon as it gets into the loadData function, I get an error:
Error: Uncaught TypeError: string is not a function
I absolutely do not know why this causes me so many problems. Thanks in advance!
Thanks, the problem is that I used $, I often do not use jQuery, only when I need cross-browser compatibility. Thanks for that, will mark "Answer" when the timer is up
source share