Savak,
If its working fine on the localhost, then the issue is most probably with on the server side. Try the following steps.
1. Using chrome developer tools find out if you are getting response from the server for the ajax request. If there is any issue on the server side, you’ll get appropriate errors in the response.
2. If you are not receiving data, then try to access the URL directly to see if the URL that you are accessing is right.
3. If the URL is right, then issue is probably in the PHP script. Try to debug the same.
Hope this helps
—
Sunil Urs