Просмотр исходного кода

Treat config.json ajax output as JSON instead of string

inderpreet99 11 лет назад
Родитель
Сommit
25fbae3c1b
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      js/app.js

+ 2 - 2
js/app.js

@@ -1,6 +1,6 @@
   jQuery( document ).ready(function( $ ) {
   jQuery( document ).ready(function( $ ) {
 
 
-    $.ajax( { url: 'config.json' } ).done(  function( config ) {
+    $.ajax( { url: 'config.json', dataType: 'json' } ).done(  function( config ) {
 
 
     var c = config;
     var c = config;
 
 
@@ -470,4 +470,4 @@
           };
           };
    
    
 
 
- });
+ });